summaryrefslogtreecommitdiff
path: root/src/lib/ecore_con
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2018-11-30 15:48:13 -0800
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2018-12-06 09:29:29 +0100
commit67993500da424fcdbca7d326fcd25dbbb0cd8d0f (patch)
tree53dcdf195be94b83d69ba97e07dcec975922615a /src/lib/ecore_con
parent913ea32a7aa928ff4104871a4ebc36632f53c77b (diff)
ecore_con: handle timeout of the attempt to connect.
This has been the fix that prevent random ecore_con DNS tests to fail for me. This should also in case of failure make the timeout of the ecore_con itself be honored which wasn't anymore. @fix Differential Revision: https://phab.enlightenment.org/D7402
Diffstat (limited to 'src/lib/ecore_con')
-rw-r--r--src/lib/ecore_con/ecore_con_legacy.c7
-rw-r--r--src/lib/ecore_con/efl_net_dialer_simple.c1
2 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/ecore_con/ecore_con_legacy.c b/src/lib/ecore_con/ecore_con_legacy.c
index 7925ee0..1ac6c2a 100644
--- a/src/lib/ecore_con/ecore_con_legacy.c
+++ b/src/lib/ecore_con/ecore_con_legacy.c
@@ -1341,13 +1341,19 @@ _ecore_con_server_dialer_error(void *data, const Efl_Event *event)
1341{ 1341{
1342 Ecore_Con_Server *svr = data; 1342 Ecore_Con_Server *svr = data;
1343 Eina_Error *perr = event->info; 1343 Eina_Error *perr = event->info;
1344 static int nested = EINA_FALSE;
1344 1345
1345 if (svr->delete_me) return; 1346 if (svr->delete_me) return;
1347 if (nested) return;
1348
1349 nested = EINA_TRUE;
1346 1350
1347 WRN("error reaching server %s: %s", efl_net_dialer_address_dial_get(svr->dialer), eina_error_msg_get(*perr)); 1351 WRN("error reaching server %s: %s", efl_net_dialer_address_dial_get(svr->dialer), eina_error_msg_get(*perr));
1348 1352
1349 if (_ecore_con_post_event_server_error(svr, eina_error_msg_get(*perr))) 1353 if (_ecore_con_post_event_server_error(svr, eina_error_msg_get(*perr)))
1350 _ecore_con_server_dialer_close(svr); 1354 _ecore_con_server_dialer_close(svr);
1355
1356 nested = EINA_FALSE;
1351} 1357}
1352 1358
1353static void 1359static void
@@ -1413,6 +1419,7 @@ EFL_CALLBACKS_ARRAY_DEFINE(_ecore_con_server_dialer_cbs,
1413 { EFL_IO_BUFFERED_STREAM_EVENT_SLICE_CHANGED, _ecore_con_server_dialer_slice_changed }, 1419 { EFL_IO_BUFFERED_STREAM_EVENT_SLICE_CHANGED, _ecore_con_server_dialer_slice_changed },
1414 { EFL_IO_BUFFERED_STREAM_EVENT_READ_FINISHED, _ecore_con_server_dialer_read_finished }, 1420 { EFL_IO_BUFFERED_STREAM_EVENT_READ_FINISHED, _ecore_con_server_dialer_read_finished },
1415 { EFL_IO_BUFFERED_STREAM_EVENT_FINISHED, _ecore_con_server_dialer_finished }, 1421 { EFL_IO_BUFFERED_STREAM_EVENT_FINISHED, _ecore_con_server_dialer_finished },
1422 { EFL_IO_BUFFERED_STREAM_EVENT_ERROR, _ecore_con_server_dialer_error },
1416 { EFL_NET_DIALER_EVENT_ERROR, _ecore_con_server_dialer_error }, 1423 { EFL_NET_DIALER_EVENT_ERROR, _ecore_con_server_dialer_error },
1417 { EFL_NET_DIALER_EVENT_RESOLVED, _ecore_con_server_dialer_resolved }, 1424 { EFL_NET_DIALER_EVENT_RESOLVED, _ecore_con_server_dialer_resolved },
1418 { EFL_NET_DIALER_EVENT_CONNECTED, _ecore_con_server_dialer_connected }); 1425 { EFL_NET_DIALER_EVENT_CONNECTED, _ecore_con_server_dialer_connected });
diff --git a/src/lib/ecore_con/efl_net_dialer_simple.c b/src/lib/ecore_con/efl_net_dialer_simple.c
index 8d25c37..71e99e8 100644
--- a/src/lib/ecore_con/efl_net_dialer_simple.c
+++ b/src/lib/ecore_con/efl_net_dialer_simple.c
@@ -41,7 +41,6 @@ _efl_net_dialer_simple_inner_io_error(void *data, const Efl_Event *event)
41{ 41{
42 Eo *o = data; 42 Eo *o = data;
43 efl_event_callback_call(o, EFL_NET_DIALER_EVENT_ERROR, event->info); 43 efl_event_callback_call(o, EFL_NET_DIALER_EVENT_ERROR, event->info);
44 efl_event_callback_call(o, EFL_IO_BUFFERED_STREAM_EVENT_ERROR, event->info);
45} 44}
46 45
47static void 46static void