You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by al...@apache.org on 2021/06/24 07:51:53 UTC

[dubbo] branch master updated: Fix the issue that the ReferenceConfigCache#destroy method does not call proxy.$destroy() (#8065)

This is an automated email from the ASF dual-hosted git repository.

albumenj pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo.git


The following commit(s) were added to refs/heads/master by this push:
     new eb9917e  Fix the issue that the ReferenceConfigCache#destroy method does not call proxy.$destroy() (#8065)
eb9917e is described below

commit eb9917e3b97cdfdca382e92bd5c5c1a31d0f27f6
Author: 灼华 <43...@users.noreply.github.com>
AuthorDate: Thu Jun 24 02:51:39 2021 -0500

    Fix the issue that the ReferenceConfigCache#destroy method does not call proxy.$destroy() (#8065)
---
 .../main/java/org/apache/dubbo/config/utils/ReferenceConfigCache.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/utils/ReferenceConfigCache.java b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/utils/ReferenceConfigCache.java
index 7bad3d5..34cfc8a 100644
--- a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/utils/ReferenceConfigCache.java
+++ b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/utils/ReferenceConfigCache.java
@@ -175,7 +175,8 @@ public class ReferenceConfigCache {
 
         Map<String, Object> proxiesOftype = proxies.get(type);
         if (CollectionUtils.isNotEmptyMap(proxiesOftype)) {
-            proxiesOftype.remove(key);
+            Destroyable proxy = (Destroyable) proxiesOftype.remove(key);
+            proxy.$destroy();
             if (proxiesOftype.isEmpty()) {
                 proxies.remove(type);
             }