X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fdaemon.c;h=fe87e196a4629a031e221c75bf981834214175eb;hb=7fe91339dfd08d6c4168c8493f5c1f0faca6ba54;hp=7f953e4d329abe40b4d3f6ed0e04da5a9d590839;hpb=863754cb8285ca7914ca3c20d32868448a1bedf3;p=openldap diff --git a/servers/slapd/daemon.c b/servers/slapd/daemon.c index 7f953e4d32..fe87e196a4 100644 --- a/servers/slapd/daemon.c +++ b/servers/slapd/daemon.c @@ -1,7 +1,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 1998-2008 The OpenLDAP Foundation. + * Copyright 1998-2009 The OpenLDAP Foundation. * Portions Copyright 2007 by Howard Chu, Symas Corporation. * All rights reserved. * @@ -2513,7 +2513,7 @@ slapd_daemon_task( char c[BUFSIZ]; waking = 0; tcp_read( SLAP_FD2SOCK(wake_sds[0]), c, sizeof(c) ); - break; + continue; } if ( SLAP_EVENT_IS_WRITE( i ) ) { @@ -2545,7 +2545,14 @@ slapd_daemon_task( } else if ( !w ) { Debug( LDAP_DEBUG_CONNS, "daemon: hangup on %d\n", fd, 0, 0 ); - connection_hangup( fd ); + if ( SLAP_SOCK_IS_ACTIVE( fd )) { +#ifdef HAVE_EPOLL + /* Don't keep reporting the hangup + */ + SLAP_EPOLL_SOCK_SET( fd, EPOLLET ); +#endif + connection_hangup( fd ); + } } } }