mirror of
https://github.com/m1k1o/neko.git
synced 2025-06-01 10:22:35 +02:00
unify shutdown logs.
This commit is contained in:
parent
fd35254487
commit
7e2f173460
6 changed files with 10 additions and 9 deletions
|
@ -131,7 +131,8 @@ func (manager *WebSocketManagerCtx) Start() {
|
|||
}
|
||||
|
||||
func (manager *WebSocketManagerCtx) Shutdown() error {
|
||||
manager.logger.Info().Msg("websocket shutdown")
|
||||
manager.logger.Info().Msg("shutdown")
|
||||
// TODO: Kill all connections and add waitgroup for gorutines.
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -178,10 +179,8 @@ func (manager *WebSocketManagerCtx) Upgrade(w http.ResponseWriter, r *http.Reque
|
|||
manager.logger.Err(err).Msg("failed to send disconnect event")
|
||||
}
|
||||
|
||||
if err := connection.Close(); err != nil {
|
||||
manager.logger.Warn().Err(err).Msg("connection closed with an error")
|
||||
}
|
||||
|
||||
err = connection.Close()
|
||||
manager.logger.Err(err).Msg("connection closed")
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue