mirror of
https://github.com/diamondburned/arikawa.git
synced 2025-01-07 12:38:05 +00:00
internal/wsutil: Fixed error checking
This commit is contained in:
parent
8e3826e5d6
commit
ff6669a58d
|
@ -70,6 +70,10 @@ func (c *Conn) Dial(ctx context.Context, addr string) error {
|
||||||
c.Conn, _, err = websocket.Dial(ctx, addr, &websocket.DialOptions{
|
c.Conn, _, err = websocket.Dial(ctx, addr, &websocket.DialOptions{
|
||||||
HTTPHeader: headers,
|
HTTPHeader: headers,
|
||||||
})
|
})
|
||||||
|
if err != nil {
|
||||||
|
return errors.Wrap(err, "Failed to dial WS")
|
||||||
|
}
|
||||||
|
|
||||||
c.Conn.SetReadLimit(WSReadLimit)
|
c.Conn.SetReadLimit(WSReadLimit)
|
||||||
|
|
||||||
c.events = make(chan Event)
|
c.events = make(chan Event)
|
||||||
|
|
Loading…
Reference in a new issue