Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

Commit

Permalink
run Mod:ping/0 after scheduling next call
Browse files Browse the repository at this point in the history
  • Loading branch information
hauleth committed May 2, 2019
1 parent ceb598a commit 10fa099
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/oc_internal_timer.erl
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ handle_cast(_Msg, State) -> {noreply, State}.

handle_info(ping, #state{timer = Ref, interval = Interval, module = Mod}) ->
_ = erlang:cancel_timer(Ref),
ok = Mod:ping(),
NewRef = erlang:send_after(Interval, self(), ping),
ok = Mod:ping(),

{noreply, #state{timer = NewRef,
interval = Interval,
Expand Down

0 comments on commit 10fa099

Please sign in to comment.