]> git.sur5r.net Git - openldap/commitdiff
Don't decrement descriptor count until we have checked connection is not UDP
authorLuke Howard <lukeh@openldap.org>
Mon, 8 Aug 2005 03:44:17 +0000 (03:44 +0000)
committerLuke Howard <lukeh@openldap.org>
Mon, 8 Aug 2005 03:44:17 +0000 (03:44 +0000)
servers/slapd/daemon.c

index f84cdddaa65a50567bfefdc58a56d626eed9aebc..0bdea4dd9e9a3bbe5a9d50d6e372aae9edd03704 100644 (file)
@@ -1758,8 +1758,6 @@ slapd_daemon_task(
                        if ( !SLAP_EVENT_IS_READ( slap_listeners[l]->sl_sd ))
                                continue;
                        
-                       ns--;
-
                        rc = slapd_handle_listener(slap_listeners[l]);
 
 #ifdef LDAP_CONNECTIONLESS
@@ -1767,6 +1765,8 @@ slapd_daemon_task(
                        if ( rc ) continue;
 #endif
 
+                       ns--;
+
                        /* Don't need to look at this in the data loops */
                        SLAP_EVENT_CLR_READ( slap_listeners[l]->sl_sd );
                        SLAP_EVENT_CLR_WRITE( slap_listeners[l]->sl_sd );