Commit 063981a0 authored by Ondřej Kuzník's avatar Ondřej Kuzník Committed by Ondřej Kuzník
Browse files

Respond to timeout events properly

parent ccf75c96
......@@ -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 */
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment