[
https://issues.apache.org/jira/browse/CURATOR-295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16062352#comment-16062352
]
ASF GitHub Bot commented on CURATOR-295:
----------------------------------------
Github user Randgalt commented on the issue:
https://github.com/apache/curator/pull/225
Thanks for this. This will take me a bit of time to look over.
> 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.4.14#64029)