]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-http: client: peer: Improved debug message that shows the loss of a connection.
authorStephan Bosch <stephan@dovecot.fi>
Sat, 21 May 2016 11:17:58 +0000 (13:17 +0200)
committerStephan Bosch <stephan@dovecot.fi>
Thu, 26 May 2016 01:05:44 +0000 (03:05 +0200)
src/lib-http/http-client-peer.c

index a615715499fbf16377d91e722bf09ee081853209..1f67899bf44d3e1ae34e5575e4436c68a548315a 100644 (file)
@@ -725,7 +725,7 @@ void http_client_peer_connection_failure(struct http_client_peer *peer,
 
 void http_client_peer_connection_lost(struct http_client_peer *peer)
 {
-       unsigned int num_urgent;
+       unsigned int num_pending, num_urgent;
 
        /* we get here when an already connected connection fails. if the
           connect itself fails, http_client_peer_connection_failure() is
@@ -734,8 +734,12 @@ void http_client_peer_connection_lost(struct http_client_peer *peer)
        if (peer->disconnected)
                return;
 
-       http_client_peer_debug(peer, "Lost a connection (%d connections left)",
-               array_count(&peer->conns));
+       num_pending = http_client_peer_requests_pending(peer, &num_urgent);
+
+       http_client_peer_debug(peer,
+               "Lost a connection "
+               "(%d connections left, %u requests pending, %u requests urgent)",
+               array_count(&peer->conns), num_pending, num_urgent);
 
        if (peer->handling_requests) {
                /* we got here from the request handler loop */