mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-22 17:28:25 +01:00
Use better fallback value for room activity time when skipping room in decide_room
This commit is contained in:
parent
371c0777bb
commit
2ab7da1e8f
@ -890,13 +890,13 @@ decide_room(unused, {_Room_name, _Host, ServerHost, Room_pid}, Last_allowed) ->
|
||||
{Just_created, Num_users} =
|
||||
case Room_pid of
|
||||
Pid when is_pid(Pid) andalso OnlyHibernated ->
|
||||
{0, 0};
|
||||
{erlang:system_time(microsecond), 0};
|
||||
Pid when is_pid(Pid) ->
|
||||
case mod_muc_room:get_state(Room_pid) of
|
||||
{ok, #state{just_created = JD, users = U}} ->
|
||||
{JD, maps:size(U)};
|
||||
{ok, #state{just_created = JC, users = U}} ->
|
||||
{JC, maps:size(U)};
|
||||
_ ->
|
||||
{0, 0}
|
||||
{erlang:system_time(microsecond), 0}
|
||||
end;
|
||||
Opts ->
|
||||
case lists:keyfind(hibernation_time, 1, Opts) of
|
||||
|
Loading…
Reference in New Issue
Block a user