diff --git a/server/modules/protocol/mysql_backend.c b/server/modules/protocol/mysql_backend.c index 4ebd3df05..fa80e71b9 100644 --- a/server/modules/protocol/mysql_backend.c +++ b/server/modules/protocol/mysql_backend.c @@ -623,9 +623,14 @@ static int gw_write_backend_event(DCB *dcb) { if (dcb->writeq != NULL) { data = (uint8_t *)GWBUF_DATA(dcb->writeq); - - if (!(MYSQL_IS_COM_QUIT(data))) + + if(dcb->session->client == NULL) + { + rc = 0; + } + else if (!(MYSQL_IS_COM_QUIT(data))) { + /*< vraa : errorHandle */ mysql_send_custom_error( dcb->session->client,