path: root/src/lib/ecore_ipc
diff options
authorGustavo Sverzut Barbieri <>2016-12-19 12:57:09 -0200
committerGustavo Sverzut Barbieri <>2016-12-19 13:03:33 -0200
commita7657e821f81eab59a719c81d3994194492476a6 (patch)
tree7e0a48ab43b60925301e5f7f86c75b6030e6c689 /src/lib/ecore_ipc
parentfe668ef52c74f52c45d1c0af6a1df791ab412e35 (diff)
ecore_con/ecore_ipc: flush should wait for connection.
Some applications will create the handle, immediately send data, flush and delete it, expecting the data to be sent to remote peer. This is a bad behavior as the application would become unresponsive until the connection is established, data can be written (since depends on server consuming it), then allow it to be closed. A proper behavior here would be to chain based on events, with the usage of a copier would be simply wait for "done" event. However the legacy API allowed this and terminology depends on this awkward "feature", thus be bug-compatible. This fixes T5015.
Diffstat (limited to 'src/lib/ecore_ipc')
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/ecore_ipc/ecore_ipc.c b/src/lib/ecore_ipc/ecore_ipc.c
index 40a1e1e8a7..ec83de76f5 100644
--- a/src/lib/ecore_ipc/ecore_ipc.c
+++ b/src/lib/ecore_ipc/ecore_ipc.c
@@ -1182,6 +1182,9 @@ ecore_ipc_server_flush(Ecore_Ipc_Server *svr)
1182 } 1182 }
1183 if (svr->dialer.input) 1183 if (svr->dialer.input)
1184 { 1184 {
1185 while (!efl_io_closer_closed_get(svr->dialer.dialer) &&
1186 !efl_net_dialer_connected_get(svr->dialer.dialer))
1187 ecore_main_loop_iterate();
1185 while (efl_io_queue_usage_get(svr->dialer.input) > 0) 1188 while (efl_io_queue_usage_get(svr->dialer.input) > 0)
1186 efl_io_copier_flush(svr->dialer.send_copier, EINA_TRUE, EINA_TRUE); 1189 efl_io_copier_flush(svr->dialer.send_copier, EINA_TRUE, EINA_TRUE);
1187 return; 1190 return;