From f53e112bf49766f1cc55516c2d7ee571461d483f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Tue, 30 Jan 2018 19:19:04 +0200 Subject: [PATCH] Don't write errors to dummy sessions If a DCB is closed before a response to the handshake packet is received, the DCB's session will point to the dummy session. In this case no error should be written to the DCB. --- server/modules/protocol/MySQL/mariadbclient/mysql_client.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/modules/protocol/MySQL/mariadbclient/mysql_client.cc b/server/modules/protocol/MySQL/mariadbclient/mysql_client.cc index 0055b528b..d9cf55327 100644 --- a/server/modules/protocol/MySQL/mariadbclient/mysql_client.cc +++ b/server/modules/protocol/MySQL/mariadbclient/mysql_client.cc @@ -1416,7 +1416,7 @@ static int gw_client_hangup_event(DCB *dcb) goto retblock; } - if (!session_valid_for_pool(session)) + if (session->state != SESSION_STATE_DUMMY && !session_valid_for_pool(session)) { // The client did not send a COM_QUIT packet modutil_send_mysql_err_packet(dcb, 0, 0, 1927, "08S01", "Connection killed by MaxScale");