25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

Report failures of changing net_ticktime

This commit is contained in:
Evgeny Khramtsov 2019-07-18 13:02:13 +03:00
parent 6397dc5d4c
commit 478f69317b

View File

@ -163,7 +163,15 @@ subscribe(Proc) ->
%%%=================================================================== %%%===================================================================
set_ticktime() -> set_ticktime() ->
Ticktime = ejabberd_option:net_ticktime() div 1000, Ticktime = ejabberd_option:net_ticktime() div 1000,
net_kernel:set_net_ticktime(Ticktime). case net_kernel:set_net_ticktime(Ticktime) of
{ongoing_change_to, Time} when Time /= Ticktime ->
?ERROR_MSG("Failed to set new net_ticktime because "
"the net kernel is busy changing it to the "
"previously configured value. Please wait for "
"~B seconds and retry", [Time]);
_ ->
ok
end.
%%%=================================================================== %%%===================================================================
%%% gen_server API %%% gen_server API