From fd9d5ec6f857a7f1d86845be7d43b8e66dff50ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Sat, 18 Sep 2021 13:41:20 +0200 Subject: [PATCH] websocket shutdown + log. --- internal/websocket/manager.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/websocket/manager.go b/internal/websocket/manager.go index 540447d3..6a0e5a72 100644 --- a/internal/websocket/manager.go +++ b/internal/websocket/manager.go @@ -276,8 +276,8 @@ func (manager *WebSocketManagerCtx) handle(connection *websocket.Conn, session t case <-cancel: return case <-manager.shutdown: - connection.Close() - return + err := connection.Close() + manager.logger.Err(err).Msg("connection shutdown") case <-ticker.C: if err := connection.WriteMessage(websocket.PingMessage, nil); err != nil { logger.Err(err).Msg("ping message has failed")