You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Oleg Kalnichevski (JIRA)" <ji...@apache.org> on 2007/06/08 21:58:25 UTC

[jira] Resolved: (HTTPCORE-76) Closing SSLIOSession for hung SSL session can hang app

     [ https://issues.apache.org/jira/browse/HTTPCORE-76?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Kalnichevski resolved HTTPCORE-76.
---------------------------------------

    Resolution: Fixed

Patch checked in. Many thanks, Sandeep, for this contribution

Oleg

> Closing SSLIOSession for hung SSL session can hang app
> ------------------------------------------------------
>
>                 Key: HTTPCORE-76
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-76
>             Project: HttpComponents Core
>          Issue Type: Bug
>    Affects Versions: 4.0-alpha5
>            Reporter: Sandeep Tamhankar
>             Fix For: 4.0-alpha5
>
>         Attachments: IOSession.java, IOSession.java, IOSessionImpl.java, NHttpConnectionBase.java, nio.diff, SSLIOSession.java
>
>
> 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.

-- 
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: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org