From 863754cb8285ca7914ca3c20d32868448a1bedf3 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 16 Jan 2009 22:32:21 +0000 Subject: [PATCH] Fix prev commit, was hanging up on write events --- servers/slapd/daemon.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 ); -- 2.39.5