mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
websocket shutdown + log.
This commit is contained in:
parent
137614c087
commit
fd9d5ec6f8
@ -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…
Reference in New Issue
Block a user