Fix client limit when reject excess clients is enabled
authorlmunch <lmunch@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 28 Jan 2010 16:05:34 +0000 (16:05 +0000)
committerlmunch <lmunch@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 28 Jan 2010 16:05:34 +0000 (16:05 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/ecore@45665 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/ecore_con/ecore_con.c

index 29241cc..86ca9aa 100644 (file)
@@ -1072,8 +1072,11 @@ _ecore_con_svr_handler(void *data, Ecore_Fd_Handler *fd_handler __UNUSED__)
 
        if ((svr->client_limit >= 0) && (svr->reject_excess_clients))
          {
-            close(new_fd);
-            return 1;
+           if (eina_list_count(svr->clients) >= svr->client_limit)
+             {
+               close(new_fd);
+               return 1;
+             }
          }
 
        cl = calloc(1, sizeof(Ecore_Con_Client));