From: Timo Sirainen Date: Tue, 5 Mar 2013 09:24:46 +0000 (+0200) Subject: lib-http: If connection was refused to a host, retry again on next request. X-Git-Tag: 2.2.rc3~80 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e1339aaa8ee91c233da5e08db67cbf4a2938624e;p=thirdparty%2Fdovecot%2Fcore.git lib-http: If connection was refused to a host, retry again on next request. Instead of never retrying again for the host. --- diff --git a/src/lib-http/http-client-host.c b/src/lib-http/http-client-host.c index 883e43152a..9cd1785705 100644 --- a/src/lib-http/http-client-host.c +++ b/src/lib-http/http-client-host.c @@ -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)