Don't misuse monotonic_time/0
This commit is contained in:
parent
578ecad93c
commit
2febbe5ffb
|
@ -189,7 +189,7 @@ get_pids() ->
|
|||
[ejabberd_riak:get_proc(I) || I <- lists:seq(1, get_pool_size())].
|
||||
|
||||
get_random_pid() ->
|
||||
get_random_pid(p1_time_compat:monotonic_time()).
|
||||
get_random_pid(p1_time_compat:system_time()).
|
||||
|
||||
get_random_pid(Term) ->
|
||||
I = erlang:phash2(Term, get_pool_size()) + 1,
|
||||
|
|
|
@ -346,8 +346,8 @@ get_component_number(LDomain) ->
|
|||
get_domain_balancing(From, To, LDomain) ->
|
||||
case ejabberd_config:get_option(
|
||||
{domain_balancing, LDomain}, fun(D) when is_atom(D) -> D end) of
|
||||
undefined -> p1_time_compat:monotonic_time();
|
||||
random -> p1_time_compat:monotonic_time();
|
||||
undefined -> p1_time_compat:system_time();
|
||||
random -> p1_time_compat:system_time();
|
||||
source -> jid:tolower(From);
|
||||
destination -> jid:tolower(To);
|
||||
bare_source -> jid:remove_resource(jid:tolower(From));
|
||||
|
|
Loading…
Reference in New Issue