]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-http: client: queue: Fix the number of pending requests listed in http_client_que...
authorStephan Bosch <stephan.bosch@dovecot.fi>
Thu, 6 Sep 2018 00:57:24 +0000 (02:57 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 6 Sep 2018 17:03:46 +0000 (17:03 +0000)
src/lib-http/http-client-queue.c

index bc5c4973b6dff88717d869d7d81659df2fe7a0d5..12287e34c7dabdcb021b29f5436e1b82670833e2 100644 (file)
@@ -503,6 +503,9 @@ http_client_queue_connection_failure(struct http_client_queue *queue,
        struct http_client_host *host = queue->host;
        unsigned int ips_count = http_client_host_get_ips_count(host);
        struct http_client_peer *const *peer_idx;
+       unsigned int num_requests =
+               array_count(&queue->queued_requests) +
+               array_count(&queue->queued_urgent_requests);
 
        e_debug(queue->event,
                "Failed to set up connection to %s%s: %s "
@@ -510,8 +513,7 @@ http_client_queue_connection_failure(struct http_client_queue *queue,
                http_client_peer_addr2str(addr),
                (https_name == NULL ? "" :
                        t_strdup_printf(" (SSL=%s)", https_name)),
-               reason, array_count(&queue->pending_peers),
-               array_count(&queue->requests));
+               reason, array_count(&queue->pending_peers), num_requests);
 
        if (array_count(&queue->pending_peers) == 0) {
                i_assert(queue->cur_peer == peer);