diff --git a/server/modules/protocol/mysql_client.c b/server/modules/protocol/mysql_client.c index 1b47d17c0..ccae0892b 100644 --- a/server/modules/protocol/mysql_client.c +++ b/server/modules/protocol/mysql_client.c @@ -556,6 +556,8 @@ int gw_read_client_event(DCB* dcb) { rc = 0; // get the backend session, if available, and close the session + session = dcb->session; + if (session != NULL) { CHK_SESSION(session); router = session->service->router;