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

Sandeep Tamhankar updated HTTPCORE-76:
--------------------------------------

    Attachment: IOSession.java

Added shutdown method.

> 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
>         Attachments: IOSession.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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to