diff --git a/server.go b/server.go index 7583633..907d307 100644 --- a/server.go +++ b/server.go @@ -277,7 +277,11 @@ func onDisconnectCleanup(c *Channel) { delete(c.server.rooms, c) } + + go deleteSid(c) +} +func deleteSid(c *Channel) { c.server.sidsLock.Lock() defer c.server.sidsLock.Unlock()