/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 1998-2008 The OpenLDAP Foundation.
+ * Copyright 1998-2009 The OpenLDAP Foundation.
* Portions Copyright 2007 by Howard Chu, Symas Corporation.
* All rights reserved.
*
char c[BUFSIZ];
waking = 0;
tcp_read( SLAP_FD2SOCK(wake_sds[0]), c, sizeof(c) );
- break;
+ continue;
}
if ( SLAP_EVENT_IS_WRITE( i ) ) {
} 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 );
+ }
}
}
}