]> git.sur5r.net Git - openldap/commitdiff
Added additional shutdown check
authorKurt Zeilenga <kurt@openldap.org>
Sat, 30 Sep 2000 18:24:28 +0000 (18:24 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Sat, 30 Sep 2000 18:24:28 +0000 (18:24 +0000)
servers/slapd/daemon.c

index 6c8ec21649b8526e898c9bd473efe2d00c7c3dcb..09cece35c057b8feaeb1d850d335e2075dcf34a2 100644 (file)
@@ -796,6 +796,8 @@ slapd_daemon_task(
                        continue;
 
                default:        /* something happened - deal with it */
+                       if( slapd_shutdown ) continue;
+
                        ebadf = 0;
                        Debug( LDAP_DEBUG_CONNS, "daemon: activity on %d descriptors\n",
                                ns, 0, 0 );
@@ -836,9 +838,9 @@ slapd_daemon_task(
                        if ( !FD_ISSET( slap_listeners[l]->sl_sd, &readfds ) )
                                continue;
 
-                       if ( (s = accept( slap_listeners[l]->sl_sd,
-                               (struct sockaddr *) &from, &len )) == AC_SOCKET_INVALID )
-                       {
+                       s = accept( slap_listeners[l]->sl_sd,
+                               (struct sockaddr *) &from, &len );
+                       if ( s == AC_SOCKET_INVALID ) {
                                int err = sock_errno();
                                Debug( LDAP_DEBUG_ANY,
                                    "daemon: accept(%ld) failed errno=%d (%s)\n",