dovecot-2.2: lib-http: Free peer if it can't be connected to and...

dovecot at dovecot.org dovecot at dovecot.org
Sun Mar 10 19:55:51 EET 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/904f78e80fa5
changeset: 16011:904f78e80fa5
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Mar 10 19:55:45 2013 +0200
description:
lib-http: Free peer if it can't be connected to and it has no pending requests.

diffstat:

 src/lib-http/http-client-peer.c |  3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diffs (13 lines):

diff -r 69407b54a557 -r 904f78e80fa5 src/lib-http/http-client-peer.c
--- a/src/lib-http/http-client-peer.c	Sun Mar 10 19:54:51 2013 +0200
+++ b/src/lib-http/http-client-peer.c	Sun Mar 10 19:55:45 2013 +0200
@@ -364,6 +364,9 @@
 			http_client_host_connection_failure(*host, &peer->addr);
 		}
 	}
+	if (array_count(&peer->conns) == 0 &&
+	    http_client_peer_requests_pending(peer, &num_urgent) == 0)
+		http_client_peer_free(&peer);
 }
 
 void http_client_peer_connection_lost(struct http_client_peer *peer)


More information about the dovecot-cvs mailing list