If no states are kept, then clear an empty rooms
This commit is contained in:
parent
493dc78a24
commit
d5f10048e1
@ -308,6 +308,14 @@ func Processor(events chan ClientEvent, finished chan struct{}) {
|
||||
}
|
||||
}
|
||||
}
|
||||
for rn, r := range rooms {
|
||||
if *statedir == "" && len(r.members) == 0 {
|
||||
log.Println(rn, "emptied room")
|
||||
delete(rooms, rn)
|
||||
close(roomSinks[r])
|
||||
delete(roomSinks, r)
|
||||
}
|
||||
}
|
||||
case EventTerm:
|
||||
for _, sink := range roomSinks {
|
||||
sink <- ClientEvent{eventType: EventTerm}
|
||||
|
Loading…
Reference in New Issue
Block a user