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} =
|
{Just_created, Num_users} =
|
||||||
case Room_pid of
|
case Room_pid of
|
||||||
Pid when is_pid(Pid) andalso OnlyHibernated ->
|
Pid when is_pid(Pid) andalso OnlyHibernated ->
|
||||||
{0, 0};
|
{erlang:system_time(microsecond), 0};
|
||||||
Pid when is_pid(Pid) ->
|
Pid when is_pid(Pid) ->
|
||||||
case mod_muc_room:get_state(Room_pid) of
|
case mod_muc_room:get_state(Room_pid) of
|
||||||
{ok, #state{just_created = JD, users = U}} ->
|
{ok, #state{just_created = JC, users = U}} ->
|
||||||
{JD, maps:size(U)};
|
{JC, maps:size(U)};
|
||||||
_ ->
|
_ ->
|
||||||
{0, 0}
|
{erlang:system_time(microsecond), 0}
|
||||||
end;
|
end;
|
||||||
Opts ->
|
Opts ->
|
||||||
case lists:keyfind(hibernation_time, 1, Opts) of
|
case lists:keyfind(hibernation_time, 1, Opts) of
|
||||||
|
Loading…
Reference in New Issue
Block a user