Prevent double closing of client DCB

If the client is closing the connection but routing the COM_QUIT fails,
the DCB would be closed twice.
This commit is contained in:
Markus Mäkelä 2018-02-01 10:16:25 +02:00
parent 9f0a691233
commit 8c8aaeae8e

View File

@ -1086,8 +1086,7 @@ gw_read_finish_processing(DCB *dcb, GWBUF *read_buffer, uint64_t capabilities)
dcb_close(dcb);
MXS_ERROR("Routing the query failed. Session will be closed.");
}
if (proto->current_command == MXS_COM_QUIT)
else if (proto->current_command == MXS_COM_QUIT)
{
/** Close router session which causes closing of backends */
dcb_close(dcb);