diff --git a/internal/websocket/receive.go b/internal/websocket/receive.go index dbce35f..3e96ca9 100644 --- a/internal/websocket/receive.go +++ b/internal/websocket/receive.go @@ -19,7 +19,7 @@ func ProcessServerMessages(conn *websocket.Conn, channel chan<- GoTomato.ServerM for { _, message, err := conn.ReadMessage() if err != nil { - if websocket.IsCloseError(err, 1000) { + if websocket.IsCloseError(err, websocket.CloseNormalClosure) { // Ignore normal closure and exit gracefully return } @@ -36,7 +36,5 @@ func ProcessServerMessages(conn *websocket.Conn, channel chan<- GoTomato.ServerM } channel <- serverMessage - channel <- serverMessage } - }