path: root/src/lib/ecore_con/efl_net_dialer_tcp.c
diff options
authorCedric BAIL <>2018-11-30 15:26:12 -0800
committerMarcel Hollerbach <>2018-12-06 09:29:28 +0100
commitb6346d0bb3ab93a86efb1f22ef2c710782859f15 (patch)
tree18090c7828f72b535e27085dd14d1c11e46ec7a9 /src/lib/ecore_con/efl_net_dialer_tcp.c
parent4485cf64a037f2cb39b5b752a9fdfd4000551586 (diff)
ecore_con: enforce connection state to not let a hanging connection continue.
It is expected that when the connection state is forcefully set, that all hanging connection should be stopped instead of them continuing and later resetting the state to having a connection. Differential Revision:
Diffstat (limited to '')
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/ecore_con/efl_net_dialer_tcp.c b/src/lib/ecore_con/efl_net_dialer_tcp.c
index a35d56501d..57f5cf93cd 100644
--- a/src/lib/ecore_con/efl_net_dialer_tcp.c
+++ b/src/lib/ecore_con/efl_net_dialer_tcp.c
@@ -241,6 +241,8 @@ EOLIAN static void
241_efl_net_dialer_tcp_efl_net_dialer_connected_set(Eo *o, Efl_Net_Dialer_Tcp_Data *pd, Eina_Bool connected) 241_efl_net_dialer_tcp_efl_net_dialer_connected_set(Eo *o, Efl_Net_Dialer_Tcp_Data *pd, Eina_Bool connected)
242{ 242{
243 if (pd->connect.timeout) eina_future_cancel(pd->connect.timeout); 243 if (pd->connect.timeout) eina_future_cancel(pd->connect.timeout);
244 // This has to be done before the state check as there could be a connection in progress that need to be canceled
245 if (!connected) _efl_net_dialer_tcp_async_stop(pd);
244 if (pd->connected == connected) return; 246 if (pd->connected == connected) return;
245 pd->connected = connected; 247 pd->connected = connected;
246 if (connected) efl_event_callback_call(o, EFL_NET_DIALER_EVENT_CONNECTED, NULL); 248 if (connected) efl_event_callback_call(o, EFL_NET_DIALER_EVENT_CONNECTED, NULL);