a simple simplify came from the previous PR that merged

Former-commit-id: 509d0ac8164562b655eebf0fe1fc8e166d8f0464
This commit is contained in:
Gerasimos (Makis) Maropoulos 2018-01-05 08:22:18 +02:00
parent c541657d44
commit ade6809fc1

View File

@ -259,7 +259,7 @@ func (s *Server) join(roomName string, connID string) {
// LeaveAll kicks out a connection from ALL of its joined rooms // LeaveAll kicks out a connection from ALL of its joined rooms
func (s *Server) LeaveAll(connID string) { func (s *Server) LeaveAll(connID string) {
s.mu.Lock() s.mu.Lock()
for name, _ := range s.rooms { for name := range s.rooms {
s.leave(name, connID) s.leave(name, connID)
} }
s.mu.Unlock() s.mu.Unlock()