Return-Path: X-Original-To: apmail-hc-dev-archive@www.apache.org Delivered-To: apmail-hc-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BFE4A11979 for ; Tue, 19 Aug 2014 09:09:18 +0000 (UTC) Received: (qmail 66896 invoked by uid 500); 19 Aug 2014 09:09:18 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 66857 invoked by uid 500); 19 Aug 2014 09:09:18 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 66625 invoked by uid 99); 19 Aug 2014 09:09:18 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Aug 2014 09:09:18 +0000 Date: Tue, 19 Aug 2014 09:09:18 +0000 (UTC) From: "Christopher Brown (JIRA)" To: dev@hc.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HTTPCLIENT-1495) Finalizer in PoolingHttpClientConnectionManager should not log "shutdown" messages if already shutdown normally MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HTTPCLIENT-1495?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14102047#comment-14102047 ] Christopher Brown commented on HTTPCLIENT-1495: ----------------------------------------------- I've tested the fix as of 4.3.5, and it seems fine. No more [Finalizer] thread log messages, all messages seem to be logged by the expected thread at the expected time. Thanks. > Finalizer in PoolingHttpClientConnectionManager should not log "shutdown" messages if already shutdown normally > --------------------------------------------------------------------------------------------------------------- > > Key: HTTPCLIENT-1495 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1495 > Project: HttpComponents HttpClient > Issue Type: Improvement > Components: HttpConn > Affects Versions: 4.3.1 > Reporter: Christopher Brown > Priority: Minor > Fix For: 4.3.4, 4.4 Alpha1 > > > Despite shutting down the CloseableHttpClient instance using "close()", which in turn calls shutdown() on the PoolingHttpClientConnectionManager, messages are still logged such as the following in all cases after a JVM garbage collection: > [Finalizer] DEBUG o.a.h.i.c.PoolingHttpClientConnectionManager - Connection manager is shutting down > The finalizer thread always calls "shutdown", which always logs the "shutdown" messages. This led me to believe (when tracking memory leaks) that there was a problem in my usage of HTTP client, when in fact the message was just misleading (everything was fine). > It would be preferable, perhaps via a volatile boolean instance field on the connection manager, to suppress the shutdown messages (and maybe even suppress redundant resource cleanup attempts). This would help users of the library to concentrate on other issues. > Thanks. -- This message was sent by Atlassian JIRA (v6.2#6252) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org