aboutsummaryrefslogtreecommitdiff
path: root/roomserver/storage/shared/storage.go
diff options
context:
space:
mode:
Diffstat (limited to 'roomserver/storage/shared/storage.go')
-rw-r--r--roomserver/storage/shared/storage.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/roomserver/storage/shared/storage.go b/roomserver/storage/shared/storage.go
index fc3ace6a..3c8b69c3 100644
--- a/roomserver/storage/shared/storage.go
+++ b/roomserver/storage/shared/storage.go
@@ -282,17 +282,17 @@ func (d *Database) addState(
var found bool
for i := len(state) - 1; i >= 0; i-- {
found = false
+ blocksLoop:
for _, events := range blocks {
for _, event := range events {
if state[i].EventNID == event {
found = true
- break
+ break blocksLoop
}
}
}
if found {
state = append(state[:i], state[i+1:]...)
- i--
}
}
}