From bdf546c47a0d0cd5700c013ce4d3fc91ea054c8d Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 30 Nov 2019 16:36:20 -0800 Subject: [PATCH] Don't log an error for suspended servers like this --- websocket.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/websocket.go b/websocket.go index 1254591..e6f441f 100644 --- a/websocket.go +++ b/websocket.go @@ -287,12 +287,14 @@ func (wsh *WebsocketHandler) SendErrorJson(err error) error { wsm := WebsocketMessage{Event: ErrorEvent} wsm.Args = []string{m} - zap.S().Errorw( - "an error was encountered in the websocket process", - zap.String("server", wsh.Server.Uuid), - zap.String("error_identifier", u.String()), - zap.Error(err), - ) + if !server.IsSuspendedError(err) { + zap.S().Errorw( + "an error was encountered in the websocket process", + zap.String("server", wsh.Server.Uuid), + zap.String("error_identifier", u.String()), + zap.Error(err), + ) + } return wsh.Connection.WriteJSON(wsm) }