mirror of
https://github.com/signaller-matrix/signaller.git
synced 2024-11-05 02:01:03 +00:00
Switch mutex RLock to Lock for RW method
This commit is contained in:
parent
20fea5c1dd
commit
a2869ebf85
@ -191,8 +191,8 @@ func (backend *Backend) GetEventByID(id string) rooms.Event {
|
||||
}
|
||||
|
||||
func (backend *Backend) PutEvent(event rooms.Event) error {
|
||||
backend.mutex.RLock()
|
||||
defer backend.mutex.RUnlock()
|
||||
backend.mutex.Lock()
|
||||
defer backend.mutex.Unlock()
|
||||
|
||||
backend.events[event.EventID] = event
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user