]> granicus.if.org Git - pgbouncer/commitdiff
Don't send ReadyForQuery on main_connection as it may cause clients to get out of...
authorcpatru <cpatru@yammer-inc.com>
Wed, 14 Sep 2016 17:17:40 +0000 (18:17 +0100)
committercpatru <cpatru@yammer-inc.com>
Tue, 25 Oct 2016 16:35:17 +0000 (17:35 +0100)
src/admin.c
src/objects.c

index 35bb89872ada3f9a15a4007c87c44da3c66ba7e8..113e6cd6cd75626656c5c597d0a1e537b2c9935b 100644 (file)
@@ -1529,18 +1529,11 @@ void admin_pause_done(void)
 /* admin on console has pressed ^C */
 void admin_handle_cancel(PgSocket *admin)
 {
-       bool res;
-
        /* weird, but no reason to fail */
        if (!admin->wait_for_response)
                slog_warning(admin, "admin cancel request for non-waiting client?");
 
        if (cf_pause_mode != P_NONE)
                full_resume();
-
-       /* notify readiness */
-       SEND_ReadyForQuery(res, admin);
-       if (!res)
-               disconnect_client(admin, false, "readiness send failed");
 }
 
index b1ad273d36e80ee41ead4dccb137fa81219d1216..16063733b3154122b365fce50e52422bd6a35255 100644 (file)
@@ -1280,8 +1280,6 @@ found:
 
        /* not linked client, just drop it then */
        if (!main_client->link) {
-               bool res;
-
                /* let administrative cancel be handled elsewhere */
                if (main_client->pool->db->admin) {
                        disconnect_client(req, false, "cancel request for console client");
@@ -1291,10 +1289,6 @@ found:
 
                disconnect_client(req, false, "cancel request for idle client");
 
-               /* notify readiness */
-               SEND_ReadyForQuery(res, main_client);
-               if (!res)
-                       disconnect_client(main_client, true, "ReadyForQuery for main_client failed");
                return;
        }