mirror of
https://github.com/signaller-matrix/signaller.git
synced 2024-11-09 12:11: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 {
|
func (backend *Backend) PutEvent(event rooms.Event) error {
|
||||||
backend.mutex.RLock()
|
backend.mutex.Lock()
|
||||||
defer backend.mutex.RUnlock()
|
defer backend.mutex.Unlock()
|
||||||
|
|
||||||
backend.events[event.EventID] = event
|
backend.events[event.EventID] = event
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user