mirror of https://github.com/gorilla/websocket.git
Don't log 1006 error in chat example
This error is expected (Safari closes connections without sending a close frame). Fixes #323
This commit is contained in:
parent
d965e9adc6
commit
58729a2165
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue