* and that the stream is now inactive.
* connection_write() must validate the stream is still
* active.
+ *
+ * ITS#4338: if the stream is invalid, there is no need to
+ * close it here. It has already been closed in connection.c.
*/
if ( connection_write( wd ) < 0 ) {
if ( SLAP_EVENT_IS_READ( wd )) {
SLAP_EVENT_CLR_READ( (unsigned) wd );
nrfds--;
}
- slapd_close( wd );
}
#endif
}
#ifdef SLAP_LIGHTWEIGHT_DISPATCHER
connection_read_activate( rd );
#else
- if ( connection_read( rd ) < 0 ) {
- slapd_close( rd );
- }
+ connection_read( rd );
#endif
}
#else /* !SLAP_EVENTS_ARE_INDEXED */
* active.
*/
if ( connection_write( fd ) < 0 ) {
- slapd_close( fd );
continue;
}
#endif
* connection_read() must valid the stream is still
* active.
*/
- if ( connection_read( fd ) < 0 ) slapd_close( fd );
+ connection_read( fd );
#endif
}
}