mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-27 10:09:43 -05:00
Check for shutdown after successful select()
This commit is contained in:
parent
8a8ed19a44
commit
fcc86b2456
1 changed files with 5 additions and 3 deletions
|
|
@ -797,6 +797,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 );
|
||||
|
|
@ -837,9 +839,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",
|
||||
|
|
|
|||
Loading…
Reference in a new issue