Don't log an error for suspended servers like this
This commit is contained in:
parent
4ce9c83fad
commit
bdf546c47a
14
websocket.go
14
websocket.go
|
@ -287,12 +287,14 @@ func (wsh *WebsocketHandler) SendErrorJson(err error) error {
|
||||||
wsm := WebsocketMessage{Event: ErrorEvent}
|
wsm := WebsocketMessage{Event: ErrorEvent}
|
||||||
wsm.Args = []string{m}
|
wsm.Args = []string{m}
|
||||||
|
|
||||||
zap.S().Errorw(
|
if !server.IsSuspendedError(err) {
|
||||||
"an error was encountered in the websocket process",
|
zap.S().Errorw(
|
||||||
zap.String("server", wsh.Server.Uuid),
|
"an error was encountered in the websocket process",
|
||||||
zap.String("error_identifier", u.String()),
|
zap.String("server", wsh.Server.Uuid),
|
||||||
zap.Error(err),
|
zap.String("error_identifier", u.String()),
|
||||||
)
|
zap.Error(err),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
return wsh.Connection.WriteJSON(wsm)
|
return wsh.Connection.WriteJSON(wsm)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user