Clear waiting results flag on client errors

When a backend causes an error and it should be sent to the client, the
backend reference was closed but the waiting results state was not
cleared. This caused a debug assertion to be hit.
This commit is contained in:
Markus Makela 2016-09-16 01:13:52 +03:00
parent 7bd0b19b59
commit 2a4addc298

View File

@ -4395,6 +4395,10 @@ static void handle_error_reply_client(SESSION *ses, ROUTER_CLIENT_SES *rses,
CHK_BACKEND_REF(bref);
bref_clear_state(bref, BREF_IN_USE);
bref_set_state(bref, BREF_CLOSED);
if (BREF_IS_WAITING_RESULT(bref))
{
bref_clear_state(bref, BREF_WAITING_RESULT);
}
}
if (sesstate == SESSION_STATE_ROUTER_READY)