]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-http: Added more debug logging.
authorTimo Sirainen <tss@iki.fi>
Tue, 25 Aug 2015 14:03:19 +0000 (17:03 +0300)
committerTimo Sirainen <tss@iki.fi>
Tue, 25 Aug 2015 14:03:19 +0000 (17:03 +0300)
Patch by Stephan Bosch.

src/lib-http/http-client-peer.c

index 558dc5b874254bfbde158912611078b2e04ba0b2..be905e90640e9006cb29855c616aad6cbaf1b206 100644 (file)
@@ -220,6 +220,9 @@ http_client_peer_handle_requests_real(struct http_client_peer *peer)
        /* disconnect if we're not linked to any queue anymore */
        if (array_count(&peer->queues) == 0) {
                i_assert(peer->to_backoff != NULL);
+               http_client_peer_debug(peer,
+                       "Peer no longer used; will now disconnect "
+                       "(%u connections exist)", array_count(&peer->conns));
                http_client_peer_disconnect(peer);
                return;
        }
@@ -227,6 +230,9 @@ http_client_peer_handle_requests_real(struct http_client_peer *peer)
        /* don't do anything unless we have pending requests */
        num_pending = http_client_peer_requests_pending(peer, &num_urgent);
        if (num_pending == 0) {
+               http_client_peer_debug(peer,
+                       "No requests to service for this peer "
+                       "(%u connections exist)", array_count(&peer->conns));
                http_client_peer_check_idle(peer);
                return;
        }
@@ -296,10 +302,13 @@ http_client_peer_handle_requests_real(struct http_client_peer *peer)
                                }
                        }
                }
-       
+
                /* don't continue unless we have more pending requests */
                num_pending = http_client_peer_requests_pending(peer, &num_urgent);
                if (num_pending == 0) {
+                       http_client_peer_debug(peer,
+                               "No more requests to service for this peer "
+                               "(%u connections exist)", array_count(&peer->conns));
                        http_client_peer_check_idle(peer);
                        return;
                }