From: Howard Chu Date: Fri, 16 Jan 2009 22:32:21 +0000 (+0000) Subject: Fix prev commit, was hanging up on write events X-Git-Tag: ACLCHECK_0~1002 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=863754cb8285ca7914ca3c20d32868448a1bedf3;p=openldap Fix prev commit, was hanging up on write events --- diff --git a/servers/slapd/daemon.c b/servers/slapd/daemon.c index 0c12c1a3ef..7f953e4d32 100644 --- a/servers/slapd/daemon.c +++ b/servers/slapd/daemon.c @@ -2495,7 +2495,7 @@ slapd_daemon_task( #endif /* LDAP_DEBUG */ for ( i = 0; i < ns; i++ ) { - int rc = 1, fd; + int rc = 1, fd, w = 0; if ( SLAP_EVENT_IS_LISTENER( i ) ) { rc = slap_listener_activate( SLAP_EVENT_LISTENER( i ) ); @@ -2522,6 +2522,7 @@ slapd_daemon_task( fd, 0, 0 ); SLAP_EVENT_CLR_WRITE( i ); + w = 1; /* * NOTE: it is possible that the connection was closed @@ -2541,7 +2542,7 @@ slapd_daemon_task( SLAP_EVENT_CLR_READ( i ); connection_read_activate( fd ); - } else { + } else if ( !w ) { Debug( LDAP_DEBUG_CONNS, "daemon: hangup on %d\n", fd, 0, 0 ); connection_hangup( fd );