1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2025-01-05 19:57:02 +00:00

internal/wsutil: Fixed error checking

This commit is contained in:
diamondburned 2020-02-11 09:23:42 -08:00
parent 8e3826e5d6
commit ff6669a58d

View file

@ -70,6 +70,10 @@ func (c *Conn) Dial(ctx context.Context, addr string) error {
c.Conn, _, err = websocket.Dial(ctx, addr, &websocket.DialOptions{
HTTPHeader: headers,
})
if err != nil {
return errors.Wrap(err, "Failed to dial WS")
}
c.Conn.SetReadLimit(WSReadLimit)
c.events = make(chan Event)