forked from enlightenment/efl
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: https://phab.enlightenment.org/D7397
This commit is contained in:
parent
4485cf64a0
commit
b6346d0bb3
|
@ -241,6 +241,8 @@ EOLIAN static void
|
|||
_efl_net_dialer_tcp_efl_net_dialer_connected_set(Eo *o, Efl_Net_Dialer_Tcp_Data *pd, Eina_Bool connected)
|
||||
{
|
||||
if (pd->connect.timeout) eina_future_cancel(pd->connect.timeout);
|
||||
// This has to be done before the state check as there could be a connection in progress that need to be canceled
|
||||
if (!connected) _efl_net_dialer_tcp_async_stop(pd);
|
||||
if (pd->connected == connected) return;
|
||||
pd->connected = connected;
|
||||
if (connected) efl_event_callback_call(o, EFL_NET_DIALER_EVENT_CONNECTED, NULL);
|
||||
|
|
Loading…
Reference in New Issue