mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
Don't forget not-persistent rooms in load_permanent_rooms
Only non-persistent rooms that we are storing are those that were hibernated but also have mucsub subscribers in them. I don't think it makes sense to destroy those rooms on restart/reload if we didn't destroy them in first place when last member did leave room, let just handle those rooms like they are persistent, and kill them only when all user unsubscribe from them or they are destroyed from api.
This commit is contained in:
parent
4a54395561
commit
8a645a2d3d
@ -790,18 +790,13 @@ load_permanent_rooms(Hosts, ServerHost, Opts) ->
|
|||||||
lists:foreach(
|
lists:foreach(
|
||||||
fun(R) ->
|
fun(R) ->
|
||||||
{Room, _} = R#muc_room.name_host,
|
{Room, _} = R#muc_room.name_host,
|
||||||
case proplists:get_bool(persistent, R#muc_room.opts) of
|
case RMod:find_online_room(ServerHost, Room, Host) of
|
||||||
true ->
|
error ->
|
||||||
case RMod:find_online_room(ServerHost, Room, Host) of
|
start_room(RMod, Host, ServerHost, Access,
|
||||||
error ->
|
Room, HistorySize, RoomShaper,
|
||||||
start_room(RMod, Host, ServerHost, Access,
|
R#muc_room.opts, QueueType);
|
||||||
Room, HistorySize, RoomShaper,
|
{ok, _} ->
|
||||||
R#muc_room.opts, QueueType);
|
ok
|
||||||
{ok, _} ->
|
|
||||||
ok
|
|
||||||
end;
|
|
||||||
_ ->
|
|
||||||
forget_room(ServerHost, Host, Room)
|
|
||||||
end
|
end
|
||||||
end, get_rooms(ServerHost, Host))
|
end, get_rooms(ServerHost, Host))
|
||||||
end, Hosts);
|
end, Hosts);
|
||||||
|
Loading…
Reference in New Issue
Block a user