remove client from list if stale

This commit is contained in:
Sebastian Mark 2024-11-20 22:01:56 +01:00
parent a0463ad817
commit 2faa95c162

View file

@ -14,6 +14,7 @@ func RemoveStaleClients() {
for _, client := range Clients {
if client.IsStale() {
client.Conn.Close()
delete(Clients, client.Conn.LocalAddr())
}
}
mu.Unlock()