jira-importer opened a new issue, #909: URL: https://github.com/apache/httpcomponents-core/issues/909
**[Sandeep Tamhankar](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=sandman)** opened **[HTTPCORE-76](https://issues.apache.org/jira/browse/HTTPCORE-76?redirect=false)** and commented Scenario: * You use an SSLClientIOEventDispatch in a DefaultConnectingIOReactor so that SSL connections will be opened. * Use the reactor to send an https request to an SSL server. Have the SSL server not respond (block forever). * Have the app get its hands on NHttpClientConnection and try to shut down the connection. Expected Result: The selector waiting on the response from the hung server should wake up. Actual Result: The selector is never told to wake up. I believe the issue is that NHttpConnectionBase.shutdown calls close on the underlying IOSession. For plain http, the IOSession is an IOSessionImpl, and close does the right thing. For an SSLIOSession, close just shuts down the outbound connection (I guess preparing for an orderly SSL shutdown). For a hung server, you'll never wake up. If you know the server is hung apriori (as I do in my use case), I'd like a way to force shutdown the connection. In my source, I added a shutdown method to IOSession and IOSessionImpl (SSLIOSession already has a shutdown method). From NHttpConnectionBase.shutdown, I call IOSession.shutdown rather than IOSession.close. I have IOSessionImpl.shutdown simply call close(), which does the right thing. And SSLIOSession.shutdown already does what I want -- closes the embedded IOSessionImpl, which wakes up the selector. --- **Affects:** 4.0-alpha5 **Attachments:** - [IOSession.java](https://issues.apache.org/jira/secure/attachment/12357816/IOSession.java) (_2.25 kB_) - [IOSession.java](https://issues.apache.org/jira/secure/attachment/12357815/IOSession.java) (_2.25 kB_) - [IOSessionImpl.java](https://issues.apache.org/jira/secure/attachment/12357818/IOSessionImpl.java) (_7.50 kB_) - [NHttpConnectionBase.java](https://issues.apache.org/jira/secure/attachment/12357817/NHttpConnectionBase.java) (_9.53 kB_) - [nio.diff](https://issues.apache.org/jira/secure/attachment/12359224/nio.diff) (_1.48 kB_) - [SSLIOSession.java](https://issues.apache.org/jira/secure/attachment/12357820/SSLIOSession.java) (_14.71 kB_) -- 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]
