reorder a little, fix bug where client_del event was never sent if it had send data...
authordiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 9 Dec 2010 06:43:58 +0000 (06:43 +0000)
committerdiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 9 Dec 2010 06:43:58 +0000 (06:43 +0000)
question to think on: should a deleted client be allowed to finish sending its data or should it be killed immediately?

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@55391 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/ecore_con/ecore_con.c

index 0a5d47a..3b7f81b 100644 (file)
@@ -1209,7 +1209,10 @@ _ecore_con_client_free(Ecore_Con_Client *cl)
 {
    double t_start, t;
 
-   if ((!cl->buf) && cl->delete_me && (!cl->dead) && (cl->event_count < 1))
+   if (cl->event_count > 0)
+     return;
+
+   if (cl->delete_me && (!cl->dead) && (cl->event_count < 1))
      {
         /* this is a catch-all for cases when a client is not properly killed. */
 
@@ -1228,8 +1231,7 @@ _ecore_con_client_free(Ecore_Con_Client *cl)
            return;
      }
 
-   if (cl->event_count > 0)
-     return;
+
    ECORE_MAGIC_SET(cl, ECORE_MAGIC_NONE);
    t_start = ecore_time_get();
    while ((cl->buf) && (!cl->dead))