mirror of
https://github.com/signaller-matrix/signaller.git
synced 2024-11-21 18:02:24 +00:00
Fix SendMessage mutex infinity lock
This commit is contained in:
parent
4fc26f127e
commit
eed68b37fe
@ -190,8 +190,8 @@ func (user *User) LeaveRoom(room internal.Room) models.ApiError {
|
||||
func (user *User) SendMessage(room internal.Room, text string) models.ApiError {
|
||||
memRoom := room.(*Room)
|
||||
|
||||
memRoom.mutex.Lock()
|
||||
defer memRoom.mutex.Unlock()
|
||||
memRoom.mutex.RLock()
|
||||
defer memRoom.mutex.RUnlock()
|
||||
|
||||
userInRoom := false
|
||||
for _, roomMember := range memRoom.joined {
|
||||
|
Loading…
Reference in New Issue
Block a user