Fix the logic of ZookeeperDynamicConfiguration#doRemoveListener method (#9746)

This commit is contained in:
灼华 2022-03-15 12:06:27 +08:00 committed by GitHub
parent bc546c84f3
commit cf1fa64302
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -138,7 +138,7 @@ public class ZookeeperDynamicConfiguration extends TreePathDynamicConfiguration
protected void doRemoveListener(String pathKey, ConfigurationListener listener) {
cacheListener.removeListener(pathKey, listener);
Set<ConfigurationListener> configurationListeners = cacheListener.getConfigurationListeners(pathKey);
if (CollectionUtils.isNotEmpty(configurationListeners)) {
if (CollectionUtils.isEmpty(configurationListeners)) {
zkClient.removeDataListener(pathKey, cacheListener);
}
}