Add missing lock when accessing internal sessions map.

This commit is contained in:
Joachim Bauch 2021-01-05 09:09:11 +01:00
parent 97a6049154
commit af04cc956d
No known key found for this signature in database
GPG key ID: 77C1D22D53E15F02

View file

@ -701,6 +701,9 @@ func (r *Room) notifyInternalRoomDeleted() {
Type: "delete",
},
}
r.mu.Lock()
defer r.mu.Unlock()
for s := range r.internalSessions {
s.(*ClientSession).SendMessage(msg)
}