Compare commits

..

No commits in common. "46db72b2ccc11d077e0ad406ee6e9dc2184c9fdd" and "031ad331e495853ef2bed774f7ecbeb9ff63c55a" have entirely different histories.

2 changed files with 2 additions and 15 deletions

View file

@ -405,17 +405,8 @@ func handleSocketSubscription(w http.ResponseWriter, r *http.Request) {
case err == nil: case err == nil:
// We use nil-error to close the connection // We use nil-error to close the connection
case errors.As(err, &cErr): case errors.As(err, &cErr) && websocket.IsCloseError(cErr, websocket.CloseNormalClosure, websocket.CloseGoingAway):
switch cErr.Code { // We don't need to log when the remote closes the websocket gracefully
case websocket.CloseAbnormalClosure:
logger.WithError(err).Warn("overlay websocket was closed abnormally")
case websocket.CloseNormalClosure, websocket.CloseGoingAway:
// We don't need to log when the remote closes the websocket gracefully
default:
logger.WithError(err).Error("message processing caused error")
}
default: default:
logger.WithError(err).Error("message processing caused error") logger.WithError(err).Error("message processing caused error")

View file

@ -385,10 +385,6 @@ func (e *EventSubSocketClient) handleSocketError(err error, msgC chan eventSubSo
e.logger.Debug("websocket was closed normally") e.logger.Debug("websocket was closed normally")
return nil return nil
case websocket.CloseAbnormalClosure:
e.logger.Warn("websocket reported abnormal closure")
return errors.Wrap(e.connect(e.socketDest, msgC, errC, "network-error"), "re-connecting after abnormal closure")
default: default:
// Some non-twitch close code we did not expect // Some non-twitch close code we did not expect
e.logger.WithError(closeErr).Error("websocket reported unexpected error code") e.logger.WithError(closeErr).Error("websocket reported unexpected error code")