mirror of
https://github.com/signaller-matrix/signaller.git
synced 2024-11-22 02:12:20 +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 {
|
func (user *User) SendMessage(room internal.Room, text string) models.ApiError {
|
||||||
memRoom := room.(*Room)
|
memRoom := room.(*Room)
|
||||||
|
|
||||||
memRoom.mutex.Lock()
|
memRoom.mutex.RLock()
|
||||||
defer memRoom.mutex.Unlock()
|
defer memRoom.mutex.RUnlock()
|
||||||
|
|
||||||
userInRoom := false
|
userInRoom := false
|
||||||
for _, roomMember := range memRoom.joined {
|
for _, roomMember := range memRoom.joined {
|
||||||
|
Loading…
Reference in New Issue
Block a user