mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-26 01:29:59 -05:00
Respond to timeout events properly
This commit is contained in:
parent
ccf75c96c4
commit
063981a06d
1 changed files with 16 additions and 0 deletions
|
|
@ -161,6 +161,14 @@ connection_read_cb( evutil_socket_t s, short what, void *arg )
|
|||
return;
|
||||
}
|
||||
|
||||
if ( what & EV_TIMEOUT ) {
|
||||
Debug( LDAP_DEBUG_CONNS, "connection_read_cb: "
|
||||
"connid=%lu, timeout reached, destroying\n",
|
||||
c->c_connid );
|
||||
CONNECTION_DESTROY(c);
|
||||
return;
|
||||
}
|
||||
|
||||
Debug( LDAP_DEBUG_CONNS, "connection_read_cb: "
|
||||
"connection connid=%lu ready to read\n",
|
||||
c->c_connid );
|
||||
|
|
@ -246,6 +254,14 @@ connection_write_cb( evutil_socket_t s, short what, void *arg )
|
|||
CONNECTION_UNLOCK(c);
|
||||
return;
|
||||
}
|
||||
|
||||
if ( what & EV_TIMEOUT ) {
|
||||
Debug( LDAP_DEBUG_CONNS, "connection_write_cb: "
|
||||
"connid=%lu, timeout reached, destroying\n",
|
||||
c->c_connid );
|
||||
CONNECTION_DESTROY(c);
|
||||
return;
|
||||
}
|
||||
CONNECTION_UNLOCK_INCREF(c);
|
||||
|
||||
/* Before we acquire any locks */
|
||||
|
|
|
|||
Loading…
Reference in a new issue