remove client from list if stale
This commit is contained in:
parent
84b9e0afd6
commit
b4eff894b8
1 changed files with 1 additions and 0 deletions
|
@ -14,6 +14,7 @@ func RemoveStaleClients() {
|
||||||
for _, client := range Clients {
|
for _, client := range Clients {
|
||||||
if client.IsStale() {
|
if client.IsStale() {
|
||||||
client.Conn.Close()
|
client.Conn.Close()
|
||||||
|
delete(Clients, client.Conn.LocalAddr())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mu.Unlock()
|
mu.Unlock()
|
||||||
|
|
Loading…
Reference in a new issue