Skip to content

Commit

Permalink
acdc_agent_fsm: don't set ready status until apply_state_updates (260…
Browse files Browse the repository at this point in the history
  • Loading branch information
danielfinke authored and jamesaimonetti committed Jun 4, 2020
1 parent 26a67cc commit 21769cc
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions applications/acdc/src/acdc_agent_fsm.erl
Original file line number Diff line number Diff line change
Expand Up @@ -453,12 +453,9 @@ callback_mode() ->
%% @end
%%------------------------------------------------------------------------------
-spec wait(gen_statem:event_type(), any(), state()) -> kz_types:handle_fsm_ret(state()).
wait('cast', {'listener', AgentListener, NextState, SyncRef}, #state{account_id=AccountId
,agent_id=AgentId
}=State) ->
wait('cast', {'listener', AgentListener, NextState, SyncRef}, State) ->
lager:debug("setting agent proc to ~p", [AgentListener]),
acdc_agent_listener:fsm_started(AgentListener, self()),
acdc_agent_stats:agent_ready(AccountId, AgentId),
{'next_state', NextState, State#state{agent_listener=AgentListener
,sync_ref=SyncRef
,agent_listener_id=acdc_util:proc_id()
Expand Down

0 comments on commit 21769cc

Please sign in to comment.