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

Commit 4828e32

Browse files
committed
run Mod:ping/0 after scheduling next call
1 parent 1163d5b commit 4828e32

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/oc_internal_timer.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ handle_cast(_Msg, State) -> {noreply, State}.
4343

4444
handle_info(ping, #state{timer = Ref, interval = Interval, module = Mod}) ->
4545
_ = erlang:cancel_timer(Ref),
46-
ok = Mod:ping(),
4746
NewRef = erlang:send_after(Interval, self(), ping),
47+
ok = Mod:ping(),
4848

4949
{noreply, #state{timer = NewRef,
5050
interval = Interval,

0 commit comments

Comments
 (0)