#endif
for (i=0; i<ns; i++) {
- int rc = 1, fd;
+ int rc = 1, fd, waswrite = 0;
if ( SLAP_EVENT_IS_LISTENER(i) ) {
#ifdef SLAP_LIGHTWEIGHT_DISPATCHER
"daemon: write active on %d\n",
fd, 0, 0 );
+ waswrite = 1;
+
#ifdef SLAP_LIGHTWEIGHT_DISPATCHER
connection_write_activate( fd );
#else
}
#endif
}
- if( SLAP_EVENT_IS_READ( i ) ) {
+ /* If event is a read or an error */
+ if( SLAP_EVENT_IS_READ( i ) || !waswrite ) {
Debug( LDAP_DEBUG_CONNS,
"daemon: read active on %d\n",
fd, 0, 0 );