Skip to content

Commit

Permalink
log websocket handshake error at debug (decred#3078)
Browse files Browse the repository at this point in the history
  • Loading branch information
buck54321 authored Nov 12, 2024
1 parent 96ef8ee commit 8e18b17
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion server/comms/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,11 @@ func (s *Server) Run(ctx context.Context) {

wsConn, err := ws.NewConnection(w, r, pongWait)
if err != nil {
log.Errorf("ws connection error: %v", err)
if errors.Is(err, ws.ErrHandshake) {
log.Debug(err)
} else {
log.Errorf("ws connection error: %v", err)
}
return
}

Expand Down

0 comments on commit 8e18b17

Please sign in to comment.