better fix for ecore-con client disconnecting maybe
authordiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 24 May 2012 06:39:43 +0000 (06:39 +0000)
committerdiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 24 May 2012 06:39:43 +0000 (06:39 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@71393 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/ecore_con/ecore_con.c

index 44211b9..33f8342 100644 (file)
@@ -116,17 +116,9 @@ _ecore_con_client_kill(Ecore_Con_Client *cl)
      }
    INF("Lost client %s", (cl->ip) ? cl->ip : "");
    if (cl->fd_handler)
-     {
-        ecore_main_fd_handler_del(cl->fd_handler);
-        cl->fd_handler = NULL;
-     }
-   if (cl->host_server)
-     {
-        _ecore_con_client_free(cl);
-        cl->host_server->clients = 
-          eina_list_remove(cl->host_server->clients, cl);
-        cl->host_server = NULL;
-     }
+     ecore_main_fd_handler_del(cl->fd_handler);
+
+   cl->fd_handler = NULL;
 }
 
 void
@@ -1323,6 +1315,7 @@ _ecore_con_client_free(Ecore_Con_Client *cl)
              break;
           }
      }
+   cl->host_server->clients = eina_list_remove(cl->host_server->clients, cl);
 
 #ifdef _WIN32
    ecore_con_local_win32_client_del(cl);
@@ -2390,7 +2383,7 @@ _ecore_con_event_client_del_free(Ecore_Con_Server *svr,
                _ecore_con_server_free(svr);
           }
         if (!e->client->event_count)
-          ecore_con_client_del(e->client);
+          _ecore_con_client_free(e->client);
      }
    ecore_con_event_client_del_free(e);
    _ecore_con_event_count--;