Fix argument order for plain_fsm:handle_system_msg
plain_fsm documentation was wrong https://github.com/uwiger/plain_fsm/pull/4, so now it should be able to send sys messages to hanoi.
This commit is contained in:
parent
e3689c3d87
commit
e37623a84c
2 changed files with 3 additions and 3 deletions
|
@ -102,7 +102,7 @@ initialize(State, PrefixFolders) ->
|
|||
%% gen_fsm handling
|
||||
{system, From, Req} ->
|
||||
plain_fsm:handle_system_msg(
|
||||
From, Req, State, fun(S1) -> initialize(S1, PrefixFolders) end);
|
||||
Req, From, State, fun(S1) -> initialize(S1, PrefixFolders) end);
|
||||
|
||||
{'DOWN', MRef, _, _, _} when MRef =:= State#state.sendto_ref ->
|
||||
ok;
|
||||
|
@ -164,7 +164,7 @@ fill_from_inbox(State, Values, Queues, [PID|_]=PIDs, SavePIDs) ->
|
|||
%% gen_fsm handling
|
||||
{system, From, Req} ->
|
||||
plain_fsm:handle_system_msg(
|
||||
From, Req, State, fun(S1) -> fill_from_inbox(S1, Values, Queues, PIDs, SavePIDs) end);
|
||||
Req, From, State, fun(S1) -> fill_from_inbox(S1, Values, Queues, PIDs, SavePIDs) end);
|
||||
|
||||
{'DOWN', MRef, _, _, _} when MRef =:= State#state.sendto_ref ->
|
||||
ok;
|
||||
|
|
|
@ -632,7 +632,7 @@ main_loop(State = #state{ next=Next }) ->
|
|||
%% gen_fsm handling
|
||||
{system, From, Req} ->
|
||||
plain_fsm:handle_system_msg(
|
||||
From, Req, State, fun(S1) -> main_loop(S1) end);
|
||||
Req, From, State, fun(S1) -> main_loop(S1) end);
|
||||
|
||||
{'EXIT', Parent, Reason} ->
|
||||
plain_fsm:parent_EXIT(Reason, State);
|
||||
|
|
Loading…
Reference in a new issue