25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

cache lifetime should be converted in microseconds

This commit is contained in:
Evgeniy Khramtsov 2010-09-08 02:33:49 +10:00
parent 7a3aa8f97d
commit 556892aebf

View File

@ -335,11 +335,11 @@ do_setopts(#state{procs_num = N} = State, Opts) ->
LifeTime = case {proplists:get_value(life_time, Opts), LifeTime = case {proplists:get_value(life_time, Opts),
State#state.life_time} of State#state.life_time} of
{LT, _} when is_integer(LT), LT > 0 -> {LT, _} when is_integer(LT), LT > 0 ->
LT*1000; LT*1000*1000;
{unlimited, _} -> {unlimited, _} ->
unlimited; unlimited;
{_, undefined} -> {_, undefined} ->
?LIFETIME*1000; ?LIFETIME*1000*1000;
{_, LT} -> {_, LT} ->
LT LT
end, end,