From 419fda5514354003b86822cdd9ff7204c50982ec Mon Sep 17 00:00:00 2001 From: VilhoRaatikka Date: Fri, 14 Nov 2014 23:13:40 +0200 Subject: [PATCH] Fixed false positive debug assertion --- .../routing/readwritesplit/readwritesplit.c | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/server/modules/routing/readwritesplit/readwritesplit.c b/server/modules/routing/readwritesplit/readwritesplit.c index fbbd444a4..54fe66f2b 100644 --- a/server/modules/routing/readwritesplit/readwritesplit.c +++ b/server/modules/routing/readwritesplit/readwritesplit.c @@ -945,21 +945,21 @@ static void closeSession( { backend_ref_t* bref = &backend_ref[i]; DCB* dcb = bref->bref_dcb; -#if defined(SS_DEBUG) - /** - * session must be moved to SESSION_STATE_STOPPING state before - * router session is closed. - */ - if (dcb->session != NULL) - { - ss_dassert(dcb->session->state == SESSION_STATE_STOPPING); - } -#endif /** Close those which had been connected */ if (BREF_IS_IN_USE(bref)) { CHK_DCB(dcb); - /** Clean operation counter in bref and in SERVER */ +#if defined(SS_DEBUG) + /** + * session must be moved to SESSION_STATE_STOPPING state before + * router session is closed. + */ + if (dcb->session != NULL) + { + ss_dassert(dcb->session->state == SESSION_STATE_STOPPING); + } +#endif + /** Clean operation counter in bref and in SERVER */ while (BREF_IS_WAITING_RESULT(bref)) { bref_clear_state(bref, BREF_WAITING_RESULT);