fix stale logic
This commit is contained in:
parent
92260b44db
commit
b0b6c702da
1 changed files with 1 additions and 1 deletions
|
@ -16,7 +16,7 @@ func RemoveStaleClients() {
|
|||
for range ticker.C {
|
||||
mu.Lock()
|
||||
for _, client := range Clients {
|
||||
if !sendPing(client) || isStale(client) {
|
||||
if sendPing(client) && !isStale(client) {
|
||||
client.Conn.Close()
|
||||
delete(Clients, client.Conn.LocalAddr())
|
||||
helper.Logger.Info("Removed stale client", "host", client.RealIP)
|
||||
|
|
Loading…
Reference in a new issue