update stale removal logging
This commit is contained in:
parent
8b7e8350a0
commit
e671ad9dd4
1 changed files with 1 additions and 1 deletions
|
@ -20,9 +20,9 @@ func RemoveStaleClients() {
|
||||||
client.Conn.WriteMessage(websocket.PingMessage, nil)
|
client.Conn.WriteMessage(websocket.PingMessage, nil)
|
||||||
|
|
||||||
if isStale(client) {
|
if isStale(client) {
|
||||||
|
helper.Logger.Info("Removing stale client", "host", client.RealIP, "lastPong", client.LastPong.Format(time.RFC3339))
|
||||||
client.Conn.Close()
|
client.Conn.Close()
|
||||||
delete(Clients, client.Conn.LocalAddr())
|
delete(Clients, client.Conn.LocalAddr())
|
||||||
helper.Logger.Info("Removed stale client", "host", client.RealIP, "lastPong", client.LastPong.Format(time.RFC3339))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mu.Unlock()
|
mu.Unlock()
|
||||||
|
|
Loading…
Reference in a new issue