Github user nsuke commented on a diff in the pull request:

    https://github.com/apache/thrift/pull/840#discussion_r53421817
  
    --- Diff: lib/java/src/org/apache/thrift/async/TAsyncMethodCall.java ---
    @@ -225,8 +231,13 @@ private void cleanUpAndFireCallback(SelectionKey key) {
         key.interestOps(0);
         // this ensures that the TAsyncMethod instance doesn't hang around
         key.attach(null);
    --- End diff --
    
    It turned out that it's one key per connection.
    So indeed canceling here does not work at all, it spoils the connection 
after the first call.
    Instead, cancel() should be called when the connection is closed but is not 
unless aborted by exceptions, so key objects are certainly leaking.
    
    As it now seems a completely separate problem so I'll stop pulling it here 
and focus on this patch for now.
    Can you explain as to why you are introducing try catch anyway ?
    It's the last bit that stops me from going forward.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to