If the protocol routes a COM_QUIT packet to the backend, it must not generate a packet when it is shutting down. This could cause unexpected write errors if the backend server managed to close the socket before the write was done.