mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-06 15:10:22 -05:00
Do not bother to write to a dying connection
This commit is contained in:
parent
77f2c57132
commit
6899d0123d
2 changed files with 8 additions and 2 deletions
|
|
@ -200,9 +200,11 @@ client_write_cb( evutil_socket_t s, short what, void *arg )
|
|||
{
|
||||
Connection *c = arg;
|
||||
|
||||
/* What if the shutdown is already in progress and we get to lock the
|
||||
* connection? */
|
||||
CONNECTION_LOCK(c);
|
||||
if ( !c->c_live ) {
|
||||
CONNECTION_UNLOCK(c);
|
||||
return;
|
||||
}
|
||||
CONNECTION_UNLOCK_INCREF(c);
|
||||
|
||||
ldap_pvt_thread_mutex_lock( &c->c_io_mutex );
|
||||
|
|
|
|||
|
|
@ -670,6 +670,10 @@ upstream_write_cb( evutil_socket_t s, short what, void *arg )
|
|||
Connection *c = arg;
|
||||
|
||||
CONNECTION_LOCK(c);
|
||||
if ( !c->c_live ) {
|
||||
CONNECTION_UNLOCK(c);
|
||||
return;
|
||||
}
|
||||
CONNECTION_UNLOCK_INCREF(c);
|
||||
|
||||
ldap_pvt_thread_mutex_lock( &c->c_io_mutex );
|
||||
|
|
|
|||
Loading…
Reference in a new issue