fixeria submitted this change.
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(-)
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
To view, visit change 37265. To unsubscribe, or for help writing mail filters, visit settings.