Skip to content

Commit

Permalink
fix: return from receiveLoop on connection close
Browse files Browse the repository at this point in the history
  • Loading branch information
palkan committed Aug 19, 2021
1 parent dce9483 commit 74e9a0c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ func (c *Client) receiveLoop() {
if websocket.IsUnexpectedCloseError(err, websocket.CloseNormalClosure, websocket.CloseGoingAway) {
select {
case c.errorCh <- err:
continue
return
}
}
code := websocket.CloseGoingAway
Expand All @@ -163,7 +163,7 @@ func (c *Client) receiveLoop() {
select {
case c.closeCh <- code:
}
continue
return
}

if obj.Type == "disconnect" {
Expand Down

0 comments on commit 74e9a0c

Please sign in to comment.