remove client from list if stale
This commit is contained in:
parent
a0463ad817
commit
2faa95c162
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