Replace timer:send_after/3 by erlang:send_after/3

[#167926549]
This commit is contained in:
Diana Corbacho 2019-08-17 20:45:56 +01:00
parent 950241b43d
commit 38e6cd4ea6
1 changed files with 2 additions and 2 deletions

View File

@ -285,9 +285,9 @@ defer_heartbeat_timer(State =
when is_number(T) andalso T > 0 ->
_ = case TRef of
undefined -> ok;
_ -> {ok, cancel} = timer:cancel(TRef)
_ -> _ = erlang:cancel_timer(TRef)
end,
{ok, NewTRef} = timer:send_after(T * 2, self(), heartbeat),
NewTRef = erlang:send_after(T * 2, self(), heartbeat),
State#state{heartbeat_timer_ref = NewTRef};
defer_heartbeat_timer(State) -> State.