Always stop the session by closing the client DCB

By always starting the session shutdown process by stopping the client
DCB, the manipulation of the session state can be removed from the backend
protocol modules and replaced with a fake hangup event.

Delivering this event via the core allows the actual dcb_close call on the
client DCB to be done only when the client DCB is being handled by a
worker.
This commit is contained in:
Markus Mäkelä
2018-02-01 01:32:22 +02:00
parent ebf0d6fc5f
commit 9f0a691233
3 changed files with 10 additions and 22 deletions

View File

@ -583,7 +583,7 @@ static void do_handle_error(DCB *dcb, mxs_error_action_t action, const char *err
*/
if (!succp)
{
session->state = SESSION_STATE_STOPPING;
poll_fake_hangup_event(session->client_dcb);
}
}