mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
log socket disconnected error.
This commit is contained in:
parent
1ce6dad973
commit
91fed3c480
@ -228,7 +228,9 @@ func (ws *WebSocketHandler) handle(connection *websocket.Conn, id string) {
|
|||||||
defer func() {
|
defer func() {
|
||||||
ticker.Stop()
|
ticker.Stop()
|
||||||
ws.logger.Debug().Str("address", connection.RemoteAddr().String()).Msg("handle socket ending")
|
ws.logger.Debug().Str("address", connection.RemoteAddr().String()).Msg("handle socket ending")
|
||||||
ws.handler.Disconnected(id)
|
if err := ws.handler.Disconnected(id); err != nil {
|
||||||
|
ws.logger.Warn().Err(err).Msg("socket disconnected with error")
|
||||||
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
for {
|
for {
|
||||||
|
Loading…
Reference in New Issue
Block a user