From: Ondřej Kuzník Date: Wed, 22 Nov 2017 14:01:30 +0000 (+0000) Subject: Log timed out connections more clearly X-Git-Tag: OPENLDAP_REL_ENG_2_5_1ALPHA~18^2~93 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5cbd30ded92c24a75d1716db6224f7ca12d362bb;p=thirdparty%2Fopenldap.git Log timed out connections more clearly --- diff --git a/servers/lloadd/backend.c b/servers/lloadd/backend.c index a61cbc1633..f220065d82 100644 --- a/servers/lloadd/backend.c +++ b/servers/lloadd/backend.c @@ -58,14 +58,20 @@ upstream_connect_cb( evutil_socket_t s, short what, void *arg ) done: if ( rc ) { - char ebuf[128]; evutil_closesocket( conn->fd ); b->b_opening--; b->b_failed++; - Debug( LDAP_DEBUG_ANY, "upstream_connect_cb: " - "fd=%d connection set up failed%s%s\n", - s, error ? ": " : "", - error ? sock_errstr( error, ebuf, sizeof(ebuf) ) : "" ); + if ( what & EV_TIMEOUT ) { + Debug( LDAP_DEBUG_ANY, "upstream_connect_cb: " + "fd=%d connection timed out\n", + s ); + } else { + char ebuf[128]; + Debug( LDAP_DEBUG_ANY, "upstream_connect_cb: " + "fd=%d connection set up failed%s%s\n", + s, error ? ": " : "", + error ? sock_errstr( error, ebuf, sizeof(ebuf) ) : "" ); + } } else { b->b_failed = 0; }