mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-11 06:43:09 -05:00
ITS#10083 Do not mess with a connection that's dying already
This commit is contained in:
parent
6cbcfa0af3
commit
5677a410e6
1 changed files with 8 additions and 3 deletions
|
|
@ -139,17 +139,22 @@ static int
|
|||
handle_unsolicited( LloadConnection *c, BerElement *ber )
|
||||
{
|
||||
CONNECTION_ASSERT_LOCKED(c);
|
||||
if ( c->c_state != LLOAD_C_PREPARING ) {
|
||||
c->c_state = LLOAD_C_CLOSING;
|
||||
|
||||
assert( c->c_state != LLOAD_C_INVALID );
|
||||
if ( c->c_state == LLOAD_C_DYING ) {
|
||||
CONNECTION_UNLOCK(c);
|
||||
goto out;
|
||||
}
|
||||
c->c_state = LLOAD_C_CLOSING;
|
||||
|
||||
Debug( LDAP_DEBUG_STATS, "handle_unsolicited: "
|
||||
"teardown for upstream connection connid=%lu\n",
|
||||
c->c_connid );
|
||||
|
||||
CONNECTION_DESTROY(c);
|
||||
ber_free( ber, 1 );
|
||||
|
||||
out:
|
||||
ber_free( ber, 1 );
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue