The connection might be ready to read (close) but if we can't destroy it
yet, we don't want the callback to trigger all the time or process new
data.
ber_len_t len;
CONNECTION_LOCK(c);
+ if ( !c->c_live ) {
+ event_del( c->c_read_event );
+ CONNECTION_UNLOCK(c);
+ return;
+ }
Debug( LDAP_DEBUG_CONNS, "client_read_cb: "
"connection %lu ready to read\n",
c->c_currentber = NULL;
ber_free( ber, 1 );
+
+ event_del( c->c_read_event );
CLIENT_DESTROY(c);
return;
}
ber_len_t len;
CONNECTION_LOCK(c);
+ if ( !c->c_live ) {
+ event_del( c->c_read_event );
+ CONNECTION_UNLOCK(c);
+ return;
+ }
Debug( LDAP_DEBUG_CONNS, "upstream_read_cb: "
"connection %lu ready to read\n",
c->c_connid );
c->c_currentber = NULL;
ber_free( ber, 1 );
+
+ event_del( c->c_read_event );
UPSTREAM_DESTROY(c);
return;
}