aboutsummaryrefslogtreecommitdiff
path: root/matrix
diff options
context:
space:
mode:
Diffstat (limited to 'matrix')
-rw-r--r--matrix/rooms/roomcache.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/matrix/rooms/roomcache.go b/matrix/rooms/roomcache.go
index d66078c..067cbb6 100644
--- a/matrix/rooms/roomcache.go
+++ b/matrix/rooms/roomcache.go
@@ -74,6 +74,8 @@ func (cache *RoomCache) IsEncrypted(roomID id.RoomID) bool {
}
func (cache *RoomCache) FindSharedRooms(userID id.UserID) (shared []id.RoomID) {
+ // FIXME this disables unloading so TouchNode wouldn't try to double-lock
+ cache.DisableUnloading()
cache.Lock()
for _, room := range cache.Map {
if !room.Encrypted {
@@ -85,6 +87,7 @@ func (cache *RoomCache) FindSharedRooms(userID id.UserID) (shared []id.RoomID) {
}
}
cache.Unlock()
+ cache.EnableUnloading()
return
}