diff --git a/server/modules/protocol/mysql_backend.c b/server/modules/protocol/mysql_backend.c index 85c90319d..29d7dc2b9 100644 --- a/server/modules/protocol/mysql_backend.c +++ b/server/modules/protocol/mysql_backend.c @@ -395,7 +395,8 @@ static int gw_read_backend_event(DCB *dcb) { "Authentication with backend failed. " "Session will be closed."); - router->handleError(router_instance, + if (rsession) + router->handleError(router_instance, rsession, errbuf, dcb,