]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-http: client: With the recent addition of a connection attempt limit, connection...
authorStephan Bosch <stephan@rename-it.nl>
Sun, 12 Oct 2014 15:58:40 +0000 (08:58 -0700)
committerStephan Bosch <stephan@rename-it.nl>
Sun, 12 Oct 2014 15:58:40 +0000 (08:58 -0700)
src/lib-http/http-client-queue.c

index b9a7b64dff8a81441f865016781b81a59da8ddcd..1137f2844895b6379f6bc1c3977f7f4fae8060fa 100644 (file)
@@ -172,9 +172,9 @@ http_client_queue_is_last_connect_ip(struct http_client_queue *queue)
        i_assert(queue->ips_connect_start_idx < host->ips_count);
 
        /* if a maximum connect attempts > 1 is set, enforce it directly */
-       if (set->max_connect_attempts > 1) {
-               return queue->connect_attempts >= set->max_connect_attempts;
-       }
+       if (set->max_connect_attempts > 1 &&
+               queue->connect_attempts >= set->max_connect_attempts)
+               return TRUE;
                
        /* otherwise, we'll always go through all the IPs. we don't necessarily
           start connecting from the first IP, so we'll need to treat the IPs as