In client.go if room, ok := message.(outgoing.Room); ok { c.info.RoomID = room.ID } this part isn't thread safe. It could happen that user disconnected but wasn't removed from a room, because the disconnecting go routine couldn't see the roomID yet.