Skip to content

Commit

Permalink
Check for CloseNormalClosure.
Browse files Browse the repository at this point in the history
  • Loading branch information
sbruens committed Jan 30, 2025
1 parent d6670c1 commit b672b86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion x/websocket/endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ func (c *gorillaConn) Read(buf []byte) (int, error) {
}
if err != nil {
var closeError *websocket.CloseError
if errors.As(err, &closeError) {
if errors.As(err, &closeError) && closeError.Code == websocket.CloseNormalClosure {
return 0, io.EOF
}
return 0, err
Expand Down

0 comments on commit b672b86

Please sign in to comment.