diff --git a/server/modules/filter/tee.c b/server/modules/filter/tee.c index fc97e7bbb..2fd68bda5 100644 --- a/server/modules/filter/tee.c +++ b/server/modules/filter/tee.c @@ -1318,6 +1318,15 @@ int route_single_query(TEE_INSTANCE* my_instance, TEE_SESSION* my_session, GWBUF my_session->active = 0; return rval; } + + if (clone == NULL) + { + /** We won't be expecting any response from the child branch */ + my_session->waiting[CHILD] = false; + my_session->eof[CHILD] = 2; + my_session->n_rejected++; + } + rval = my_session->down.routeQuery(my_session->down.instance, my_session->down.session, buffer); @@ -1338,16 +1347,7 @@ int route_single_query(TEE_INSTANCE* my_instance, TEE_SESSION* my_session, GWBUF gwbuf_free(clone); } } - else - { - if (my_session->active) - { - MXS_INFO("Closed tee filter session: Child session is NULL."); - my_session->active = 0; - rval = 0; - } - my_session->n_rejected++; - } + return rval; }