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

   **[Patrick 
Moore](https://issues.apache.org/jira/secure/[email protected])**
 opened 
**[HTTPCORE-165](https://issues.apache.org/jira/browse/HTTPCORE-165?redirect=false)**
 and commented
   
   IOReactorExceptionHandler documentation for handle(RuntimeException ex) is 
misleading. Specifically the documentation says :
   
       @return <code>true</code> if it is safe to ignore the exception 
       and continue execution of the I/O reactor; <code>false</code> if the
       I/O reactor must throw {@link RuntimeException} and terminate 
   
   However, a CancelledKeyException should be rethrown because the 
BaseIOReactor and the AbstractIOReactor expect and handle CancelledKeyException 
correctly.
   
   BUT -- NOT always.
   
   Looking at the call stack for where 
IOReactorExceptionHandler.handle(RuntimeException) is called reveals some 
problems.
   
   If a custom IOReactorExceptionHandler was to return false (indicating that 
the CanceledKeyException was to be rethrown or to do the rethrow itself) WOULD 
result in the IOReactor being shutdown:
   
   BaseIOReactor.sessionClosed(IOSession)
   BaseIOReactor.timeoutCheck(SelectionKey, long)
   
   
   
   ---
   
   **Affects:** 4.0-beta2
   
   **Attachments:**
   - 
[cancelledkey.patch](https://issues.apache.org/jira/secure/attachment/12385853/cancelledkey.patch)
 (_3.45 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]

Reply via email to