path: root/src/lib/ecore_con/ecore_con_legacy.c
diff options
authorMike Blumenkrantz <>2018-07-03 12:42:00 -0400
committerChris Michael <>2018-07-03 12:42:00 -0400
commit683cddf90c8b32df5735d539ad812ef47cb67cbe (patch)
tree4397cf8e006d0de312fb154df84e0166c2a3777d /src/lib/ecore_con/ecore_con_legacy.c
parent48eb02422251066f68f01bc2c68f5acc59f3535c (diff)
ecore-con/legacy: kill server with DEL event if a dialer error occurs
Summary: in the course of the efl-net rewrite, the previous relied-upon behavior sequence of error -> disconnect -> del was broken, and error events no longer triggered disconnects or server deletion. the failure was caused by a check for the 'connecting' flag, preventing DEL events from being triggered further, the ordering of the events was flipped from ERROR -> DEL to DEL -> ERROR; this is also fixed now this caused any failed connection to leak the entire server connection since existing handlers for the del event were never triggered and the server was never destroyed @fix fix T6330 Reviewers: devilhorns Reviewed By: devilhorns Subscribers: cedric, #committers Tags: #efl Maniphest Tasks: T6330 Differential Revision:
Diffstat (limited to '')
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/ecore_con/ecore_con_legacy.c b/src/lib/ecore_con/ecore_con_legacy.c
index 4534c5d884..bd199a8278 100644
--- a/src/lib/ecore_con/ecore_con_legacy.c
+++ b/src/lib/ecore_con/ecore_con_legacy.c
@@ -983,6 +983,7 @@ _ecore_con_server_new(Eina_Bool is_dialer, Ecore_Con_Type type, const char *name
983static void 983static void
984_ecore_con_server_dialer_close(Ecore_Con_Server *svr) 984_ecore_con_server_dialer_close(Ecore_Con_Server *svr)
985{ 985{
986 svr->connecting = EINA_FALSE;
986 if (!svr->dialer) return; 987 if (!svr->dialer) return;
987 988
988 if (!efl_io_closer_closed_get(svr->dialer)) 989 if (!efl_io_closer_closed_get(svr->dialer))
@@ -1345,8 +1346,8 @@ _ecore_con_server_dialer_error(void *data, const Efl_Event *event)
1345 1346
1346 WRN("error reaching server %s: %s", efl_net_dialer_address_dial_get(svr->dialer), eina_error_msg_get(*perr)); 1347 WRN("error reaching server %s: %s", efl_net_dialer_address_dial_get(svr->dialer), eina_error_msg_get(*perr));
1347 1348
1348 _ecore_con_server_dialer_close(svr);
1349 _ecore_con_post_event_server_error(svr, eina_error_msg_get(*perr)); 1349 _ecore_con_post_event_server_error(svr, eina_error_msg_get(*perr));
1350 _ecore_con_server_dialer_close(svr);
1350} 1351}
1351 1352
1352static void 1353static void