Fix unnecessary unlocking causing panics

This commit is contained in:
Sergey Matveev 2016-09-19 12:23:28 +03:00
parent a9e5e5cd2f
commit 0a67394023

View File

@ -445,9 +445,7 @@ func Processor(events chan ClientEvent, finished chan struct{}) {
if r, found := rooms[room]; found { if r, found := rooms[room]; found {
roomSinks[r] <- ClientEvent{client, EventDel, ""} roomSinks[r] <- ClientEvent{client, EventDel, ""}
} else { } else {
roomsM.RUnlock()
client.ReplyNoChannel(room) client.ReplyNoChannel(room)
continue
} }
} }
roomsM.RUnlock() roomsM.RUnlock()