Skip to content

Commit

Permalink
Don't log 1006 error in chat example
Browse files Browse the repository at this point in the history
This error is expected (Safari closes connections without sending a close
frame).

Fixes gorilla#323
  • Loading branch information
garyburd authored Jan 9, 2018
1 parent d965e9a commit 58729a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/chat/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func (c *Client) readPump() {
for {
_, message, err := c.conn.ReadMessage()
if err != nil {
if websocket.IsUnexpectedCloseError(err, websocket.CloseGoingAway) {
if websocket.IsUnexpectedCloseError(err, websocket.CloseGoingAway, websocket.CloseAbnormalClosure) {
log.Printf("error: %v", err)
}
break
Expand Down

0 comments on commit 58729a2

Please sign in to comment.