Fixed false positive debug assertion

This commit is contained in:
VilhoRaatikka
2014-11-14 23:13:40 +02:00
parent e790437fc0
commit 419fda5514

View File

@ -945,6 +945,10 @@ static void closeSession(
{ {
backend_ref_t* bref = &backend_ref[i]; backend_ref_t* bref = &backend_ref[i];
DCB* dcb = bref->bref_dcb; DCB* dcb = bref->bref_dcb;
/** Close those which had been connected */
if (BREF_IS_IN_USE(bref))
{
CHK_DCB(dcb);
#if defined(SS_DEBUG) #if defined(SS_DEBUG)
/** /**
* session must be moved to SESSION_STATE_STOPPING state before * session must be moved to SESSION_STATE_STOPPING state before
@ -955,10 +959,6 @@ static void closeSession(
ss_dassert(dcb->session->state == SESSION_STATE_STOPPING); ss_dassert(dcb->session->state == SESSION_STATE_STOPPING);
} }
#endif #endif
/** Close those which had been connected */
if (BREF_IS_IN_USE(bref))
{
CHK_DCB(dcb);
/** Clean operation counter in bref and in SERVER */ /** Clean operation counter in bref and in SERVER */
while (BREF_IS_WAITING_RESULT(bref)) while (BREF_IS_WAITING_RESULT(bref))
{ {