Skip to content

Commit f49f0ca

Browse files
committed
Schedule lazy push, exchange ticks after work is done
1 parent 5bcb9aa commit f49f0ca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/plumtree_broadcast.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,13 +347,13 @@ handle_cast({update, Members}, State=#state{all_members=BroadcastMembers,
347347
{noreply, state()}.
348348
handle_info(lazy_tick,
349349
#state{lazy_tick_period = Period} = State) ->
350-
schedule_lazy_tick(Period),
351350
_ = send_lazy(State),
351+
schedule_lazy_tick(Period),
352352
{noreply, State};
353353
handle_info(exchange_tick,
354354
#state{exchange_tick_period = Period= State) ->
355-
schedule_exchange_tick(Period),
356355
State1 = maybe_exchange(State),
356+
schedule_exchange_tick(Period),
357357
{noreply, State1};
358358
handle_info({'DOWN', Ref, process, _Pid, _Reason}, State=#state{exchanges=Exchanges}) ->
359359
Exchanges1 = lists:keydelete(Ref, 3, Exchanges),

0 commit comments

Comments
 (0)