hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bryan Pon (JIRA)" <j...@apache.org>
Subject [jira] Created: (HTTPCORE-246) ThrottlingHttpClientHandler triggers EventListener.connectionClosed twice
Date Thu, 09 Dec 2010 23:55:01 GMT
ThrottlingHttpClientHandler triggers EventListener.connectionClosed twice

                 Key: HTTPCORE-246
                 URL: https://issues.apache.org/jira/browse/HTTPCORE-246
             Project: HttpComponents HttpCore
          Issue Type: Bug
    Affects Versions: 4.1
         Environment: Linux 2.6.32-26-generic #47-Ubuntu
            Reporter: Bryan Pon
            Priority: Minor

In ThrottlingHttpClientHandler.closed(NHttpClientConnection), connectionClosed() is called
twice on the event listener:

        if (this.eventListener != null) {


        if (this.eventListener != null) {

I'm not sure if this is intentional (looks unlikely), but I have a use case where this causes
problems.  I want to start a new connection whenever one is closed, so in the EventListener.connectionClosed()
method I am invoking ConnectingIOReactor.connect().  Since connectionClosed() is triggered
twice, this is opening two new connections.  I can work around the issue by checking if connectionClosed()
has already been called.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org

View raw message