Martin Serrano created CURATOR-295:
--------------------------------------

             Summary: Service discovery close attempts to double-close caches
                 Key: CURATOR-295
                 URL: https://issues.apache.org/jira/browse/CURATOR-295
             Project: Apache Curator
          Issue Type: Bug
          Components: Framework
    Affects Versions: 2.9.1
            Reporter: Martin Serrano


The {{ServiceDiscoveryImpl}} class close method closes all caches followed by 
closing all providers.  The {{ServiceProviderImpl}} close method calls close on 
its associated cache as well.  Since the cache is already closed, the close 
call throws an IllegalArgumentException which bubbles up.  This causes the 
{{ServiceDiscoveryImpl}} close method to abort after the first provider is 
attempted to be closed, resulting in not closing the rest of the providers or 
any of the listeners associated with the discovery instance.

The {{ServiceDiscoveryImpl}} close method should not close caches and it should 
wrap the provider closes with try/catch so that failure to close one does not 
prevent others from being closed or the listeners.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to