Skip to content

Commit

Permalink
src/tsung_controller: replace deprecated gen_fsm by gen_statem
Browse files Browse the repository at this point in the history
  • Loading branch information
ariel-anieli committed Nov 19, 2024
1 parent e643c69 commit 6f66863
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/tsung_controller/ts_timer.erl
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,18 @@
%%%----------------------------------------------------------------------
start(NClients) ->
?LOG("starting fsm timer",?INFO),
gen_fsm:start_link({global, ?MODULE}, ?MODULE, [NClients], []).
gen_statem:start_link({global, ?MODULE}, ?MODULE, [NClients], []).

config(NClients) ->
?LOGF("Configure fsm timer with ~p",[NClients],?INFO),
gen_fsm:send_event({global, ?MODULE}, {config, NClients}).
gen_statem:send_event({global, ?MODULE}, {config, NClients}).

set_timeout(Timeout) ->
?LOGF("Configure fsm timer timeout to with ~p",[Timeout],?INFO),
gen_fsm:send_event({global, ?MODULE}, {set_timeout, Timeout}).
gen_statem:send_event({global, ?MODULE}, {set_timeout, Timeout}).

connected(Pid) ->
gen_fsm:send_event({global, ?MODULE}, {connected, Pid}).
gen_statem:send_event({global, ?MODULE}, {connected, Pid}).

%%%----------------------------------------------------------------------
%%% Callback functions from gen_fsm
Expand Down

0 comments on commit 6f66863

Please sign in to comment.