mirror of
https://github.com/m1k1o/neko.git
synced 2025-05-28 08:27:09 +02:00
websocket shutdown + log.
This commit is contained in:
parent
137614c087
commit
fd9d5ec6f8
1 changed files with 2 additions and 2 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue