]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-http: Don't create a new HTTP connection when there is already one connecting.
authorTimo Sirainen <tss@iki.fi>
Wed, 5 Jun 2013 12:08:59 +0000 (15:08 +0300)
committerTimo Sirainen <tss@iki.fi>
Wed, 5 Jun 2013 12:08:59 +0000 (15:08 +0300)
src/lib-http/http-client-peer.c

index 88237d8ade5a3573e18a2c8d94de2c1a3774e72e..12618d03c044ce2fb54435f88b3b8c65c4caa913 100644 (file)
@@ -147,7 +147,7 @@ http_client_peer_next_request(struct http_client_peer *peer)
                   finished connecting successfully. */
                new_connections = 0;
        } else if (num_urgent == 0) {
-               new_connections = 1;
+               new_connections = connecting == 0 ? 1 : 0;
        } else {
                new_connections = (num_urgent > connecting ? num_urgent - connecting : 0);
        }