diff --git a/server/modules/routing/readwritesplit/readwritesplit.cc b/server/modules/routing/readwritesplit/readwritesplit.cc index 18d4c5fcb..58d3f0151 100644 --- a/server/modules/routing/readwritesplit/readwritesplit.cc +++ b/server/modules/routing/readwritesplit/readwritesplit.cc @@ -415,7 +415,7 @@ static bool handle_error_new_connection(RWSplit *inst, gwbuf_free(stored); myrses->expected_responses--; - if (backend->session_command_count()) + if (backend->session_command_count() == 0) { /** * The backend was executing a command that requires a reply.