]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-http: If connection was refused to a host, retry again on next request.
authorTimo Sirainen <tss@iki.fi>
Tue, 5 Mar 2013 09:24:46 +0000 (11:24 +0200)
committerTimo Sirainen <tss@iki.fi>
Tue, 5 Mar 2013 09:24:46 +0000 (11:24 +0200)
Instead of never retrying again for the host.

src/lib-http/http-client-host.c

index 883e43152acf3abf52f9e861964b9ee1dca9dec1..9cd1785705322779530dd76b7d119a3fe441368f 100644 (file)
@@ -142,6 +142,9 @@ http_client_host_connection_setup(struct http_client_host *host,
        }
 
        if (peer == NULL) {
+               /* all IPs failed, but retry all of them again on the
+                  next request. */
+               hport->ips_connect_idx = 0;
                http_client_host_port_error
                        (hport, HTTP_CLIENT_REQUEST_ERROR_CONNECT_FAILED, "Connection failed");
                if (host->client->ioloop != NULL)