mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-28 18:49:34 -05:00
Retain a reference around for handle_responses
This commit is contained in:
parent
c5584fd32a
commit
07b5744c2a
1 changed files with 6 additions and 3 deletions
|
|
@ -423,7 +423,7 @@ handle_responses( void *ctx, void *arg )
|
|||
Connection *c = arg;
|
||||
int responses_handled = 0;
|
||||
|
||||
CONNECTION_LOCK(c);
|
||||
CONNECTION_LOCK_DECREF(c);
|
||||
for ( ; responses_handled < slap_conn_max_pdus_per_cycle;
|
||||
responses_handled++ ) {
|
||||
BerElement *ber;
|
||||
|
|
@ -534,9 +534,12 @@ upstream_read_cb( evutil_socket_t s, short what, void *arg )
|
|||
}
|
||||
return;
|
||||
}
|
||||
event_del( c->c_read_event );
|
||||
|
||||
CONNECTION_UNLOCK(c);
|
||||
/* We have scheduled a call to handle_responses which takes care of
|
||||
* handling further requests, just make sure the connection sticks around
|
||||
* for that */
|
||||
event_del( c->c_read_event );
|
||||
CONNECTION_UNLOCK_INCREF(c);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue