From: Timo Sirainen Date: Tue, 25 Aug 2015 14:03:19 +0000 (+0300) Subject: lib-http: Added more debug logging. X-Git-Tag: 2.2.19.rc1~188 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=03435aae7b6634f84102e57d131e7dfd13f12b83;p=thirdparty%2Fdovecot%2Fcore.git lib-http: Added more debug logging. Patch by Stephan Bosch. --- diff --git a/src/lib-http/http-client-peer.c b/src/lib-http/http-client-peer.c index 558dc5b874..be905e9064 100644 --- a/src/lib-http/http-client-peer.c +++ b/src/lib-http/http-client-peer.c @@ -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; }