avoid showing error reading message on production
This commit is contained in:
@@ -55,7 +55,7 @@ func (s *Server) SetupWebsocket() {
|
|||||||
// Check for normal close error (1000) or going away error (1001)
|
// Check for normal close error (1000) or going away error (1001)
|
||||||
if err.Error() != "websocket: close 1000 (normal)" &&
|
if err.Error() != "websocket: close 1000 (normal)" &&
|
||||||
err.Error() != "websocket: close 1001 (going away)" {
|
err.Error() != "websocket: close 1001 (going away)" {
|
||||||
log.Error().Err(err).Msgf("Error reading message")
|
log.Debug().Err(err).Msgf("Error reading message")
|
||||||
}
|
}
|
||||||
// Remove the client from the slice if it has disconnected
|
// Remove the client from the slice if it has disconnected
|
||||||
s.clients = removeWsClient(s.clients, c)
|
s.clients = removeWsClient(s.clients, c)
|
||||||
|
|||||||
Reference in New Issue
Block a user