You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2022/01/23 08:50:54 UTC
[GitHub] [dubbo] AlbumenJ commented on a change in pull request #9510: Replace unnecessary synchronous or concurrent containers with ordinary containers
AlbumenJ commented on a change in pull request #9510:
URL: https://github.com/apache/dubbo/pull/9510#discussion_r790245876
##########
File path: dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/event/listener/ServiceInstancesChangedListener.java
##########
@@ -372,21 +370,20 @@ protected void notifyAddressChanged() {
* Since this listener is shared among interfaces, destroy this listener only when all interface listener are unsubscribed
*/
public synchronized void destroy() {
- if (!destroyed.get()) {
+ if (!destroyed && CollectionUtils.isEmptyMap(listeners)) {
if (CollectionUtils.isEmptyMap(listeners)) {
Review comment:
`CollectionUtils.isEmptyMap(listeners)` is roundabout
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org