Skip to content

Commit

Permalink
fix #10059, fix ZookeeperDynamicConfiguration remove cache listener m…
Browse files Browse the repository at this point in the history
…istake (#10106)

Co-authored-by: 呈铭 <beck.wcm@antgroup.com>
  • Loading branch information
wangchengming666 and 呈铭 committed Jun 6, 2022
1 parent c25284e commit edd3d28
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -121,10 +121,10 @@ protected void doAddListener(String pathKey, ConfigurationListener listener) {

@Override
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);
}
cacheListener.removeListener(pathKey, listener);
}
}

0 comments on commit edd3d28

Please sign in to comment.