Don't log an error for suspended servers like this

This commit is contained in:
Dane Everitt 2019-11-30 16:36:20 -08:00
parent 4ce9c83fad
commit bdf546c47a
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53

View File

@ -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)
} }