[ https://issues.apache.org/jira/browse/ZOOKEEPER-1375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13765979#comment-13765979 ]
Keith Turner commented on ZOOKEEPER-1375: ----------------------------------------- The finally in the java code in my prev comment should probably be the following. Also the the second catch should use a different variable name for the exception. {code:java} }finally{ if(e instanceof Error) throw (Error)e; //the other likely type is probably a RuntimeException, should this be rethrown? } {code} > SendThread is exiting after OOMError > ------------------------------------ > > Key: ZOOKEEPER-1375 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1375 > Project: ZooKeeper > Issue Type: Bug > Affects Versions: 3.4.0 > Reporter: Rakesh R > > After reviewing the ClientCnxn code, there is still chances of exiting the > SendThread without intimating the users. Say if client throws OOMError and > entered into the throwable block. Here again while sending the Disconnected > event, its creating "new WatchedEvent()" object.This will throw OOMError and > leads to exit the SendThread without any Disconnected event notification. > {noformat} > try{ > //... > } catch (Throwable e) > { > //.. > cleanup(); > if(state.isAlive()){ > eventThread.queueEvent( > new WatchedEvent(Event.EventType.None, > Event.KeeperState.Disconnected, null) ) > } > //.... > } > {noformat} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira