jira-importer opened a new issue, #1450:
URL: https://github.com/apache/httpcomponents-core/issues/1450

   **[Bryan 
Pon](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=bpon)** opened 
**[HTTPCORE-246](https://issues.apache.org/jira/browse/HTTPCORE-246?redirect=false)**
 and commented
   
   In ThrottlingHttpClientHandler.closed(NHttpClientConnection), 
connectionClosed() is called twice on the event listener:
   
           if (this.eventListener != null) {
               this.eventListener.connectionClosed(conn);
           }
       
           this.execHandler.finalizeContext(context);
       
           if (this.eventListener != null) {
               this.eventListener.connectionClosed(conn);
           }
   
   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.
   
   
   ---
   
   **Affects:** 4.1
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to