fixeria has submitted this change. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37265?usp=email )
Change subject: sctp_proxy: fix no-op 'connecting' state timeout ......................................................................
sctp_proxy: fix no-op 'connecting' state timeout
We need to perform a loop state transition if we want the timer to be scheduled for 'connecting'. Otherwise the timeout is no-op.
Change-Id: I45d874f3f73d5b9a8aa62c8a36e94e51497d6754 --- M src/sctp_proxy.erl 1 file changed, 13 insertions(+), 1 deletion(-)
Approvals: osmith: Looks good to me, but someone else must approve fixeria: Looks good to me, approved Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve
diff --git a/src/sctp_proxy.erl b/src/sctp_proxy.erl index a40371d..82c697c 100644 --- a/src/sctp_proxy.erl +++ b/src/sctp_proxy.erl @@ -87,7 +87,7 @@ ?LOG_INFO("State change: ~p -> ~p", [OldState, ?FUNCTION_NAME]), %% Initiate connection establishment with the MME {ok, Sock} = sctp_client:connect(MmeAddr, MmePort), - {keep_state, S#{sock => Sock}, + {next_state, connecting, S#{sock => Sock}, [{state_timeout, 2_000_000, conn_est_timeout}]};
%% Handle connection establishment timeout