mirror of
https://github.com/signaller-matrix/signaller.git
synced 2024-12-22 00:41:50 +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