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

Sangjin Lee updated GERONIMO-3917:
----------------------------------

    Attachment: GERONIMO-3917.patch

I am attaching one suggested fix.  The gist of the idea is, we need to keep 
track of the fact that the request is "outstanding".  It means that it 
attempted to send the request, but has not received the response nor an 
exception occurred.  If the session is closing while the request is 
outstanding, then we trigger an exception so the future is completed and the 
onException() method on the callback fires if applicable.

Please take a look at what I did, and let me know if you have suggestions or 
comments...

> response future does not complete if a connection is closed before the 
> response is received
> -------------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-3917
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-3917
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: AsyncHttpClient
>    Affects Versions: 1.x
>            Reporter: Sangjin Lee
>            Assignee: Rick McGuire
>         Attachments: GERONIMO-3917.patch
>
>
> If for *any reason* the server closes a connection without sending the 
> response, calls that wait on ResponseFuture.get() for the result will not 
> return.
> The key issue is the way HttpIoHandler.sessionClosed() works.  The 
> sessionClosed() method is invoked when a session is closed.  Currently the 
> only major things it does are to call callback's onClosed() method and remove 
> the timeout alarm.  If the message was not received or an exception did not 
> occur, however, the future remains not complete.  Therefore, any caller that 
> waits on Future.get() will never get unblocked.
> The sessionClosed() method needs to detect a situation where the connection 
> is *prematurely* closed while the response has not been received and cause an 
> exception and complete the future.
> This is a pretty critical issue.

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

Reply via email to