Skip to content

Commit

Permalink
Don't log 1006 error
Browse files Browse the repository at this point in the history
  • Loading branch information
kabychow authored Dec 20, 2024
1 parent 68b0856 commit 7f76d5b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion socket/framesocket.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,9 @@ func (fs *FrameSocket) readPump(conn *websocket.Conn, ctx context.Context) {
if err != nil {
// Ignore the error if the context has been closed
if !errors.Is(ctx.Err(), context.Canceled) {
fs.log.Errorf("Error reading from websocket: %v", err)
if websocket.IsUnexpectedCloseError(err, websocket.CloseGoingAway, websocket.CloseAbnormalClosure) {
fs.log.Errorf("Error reading from websocket: %v", err)
}
}
return
} else if msgType != websocket.BinaryMessage {
Expand Down

0 comments on commit 7f76d5b

Please sign in to comment.