Skip to content

Commit

Permalink
internal/wsutil: Fixed error checking
Browse files Browse the repository at this point in the history
  • Loading branch information
diamondburned committed Feb 11, 2020
1 parent 8e3826e commit ff6669a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/wsutil/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ff6669a

Please sign in to comment.