Skip to content

Commit

Permalink
lib-http: client: queue: Fix the number of pending requests listed in…
Browse files Browse the repository at this point in the history
… http_client_queue_connection_failure() debug message.
  • Loading branch information
stephanbosch authored and sirainen committed Sep 6, 2018
1 parent df17d53 commit dc44225
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/lib-http/http-client-queue.c
Expand Up @@ -503,15 +503,17 @@ 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 "
"(%u peers pending, %u requests pending)",
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);
Expand Down

0 comments on commit dc44225

Please sign in to comment.