]> granicus.if.org Git - pgbouncer/commitdiff
dont flush error and notice packets, as there may be several of them
authorMarko Kreen <markokr@gmail.com>
Wed, 18 Apr 2007 13:00:17 +0000 (13:00 +0000)
committerMarko Kreen <markokr@gmail.com>
Wed, 18 Apr 2007 13:00:17 +0000 (13:00 +0000)
src/server.c

index b9093f9654c08f403f178a10390cb8b62c24ab02..ec3d76ea8e1d50a39be28b02bb35bdf757451a0d 100644 (file)
@@ -137,6 +137,9 @@ static bool handle_server_work(PgSocket *server, MBuf *pkt)
                        return false;
                }
 
+               /* above packers need to be sent immidiately */
+               flush = 1;
+
        /*
         * 'E' and 'N' packets currently set ->ready to 0.  Correct would
         * be to leave ->ready as-is, because overal TX state stays same.
@@ -150,9 +153,6 @@ static bool handle_server_work(PgSocket *server, MBuf *pkt)
        case 'E':               /* ErrorResponse */
        case 'N':               /* NoticeResponse */
 
-               /* above packers need to be sent immidiately */
-               flush = 1;
-
        /*
         * chat packets, but server (and thus pooler)
         * is allowed to buffer them until Sync or Flush