You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by li...@apache.org on 2020/03/02 08:25:46 UTC

[dubbo] branch master updated: Revert "[Dubbo-5813]prevent destroyAll method of DubboShutdownHook being invoked twice when using Spring (#5814)" (#5818)

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

liujun 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 5576991  Revert "[Dubbo-5813]prevent destroyAll method of DubboShutdownHook being invoked twice when using Spring (#5814)" (#5818)
5576991 is described below

commit 5576991be387d00fa707655b0a0de0010b1f13a7
Author: ken.lj <ke...@gmail.com>
AuthorDate: Mon Mar 2 16:25:39 2020 +0800

    Revert "[Dubbo-5813]prevent destroyAll method of DubboShutdownHook being invoked twice when using Spring (#5814)" (#5818)
    
    This reverts commit 5194791f130eb34d6ed75bc43ef731289a12148a.
---
 .../main/java/org/apache/dubbo/config/bootstrap/DubboBootstrap.java  | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/bootstrap/DubboBootstrap.java b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/bootstrap/DubboBootstrap.java
index 4c6662a..7d1fb5e 100644
--- a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/bootstrap/DubboBootstrap.java
+++ b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/bootstrap/DubboBootstrap.java
@@ -1033,12 +1033,11 @@ public class DubboBootstrap extends GenericEventListener {
     }
 
     public void destroy() {
+        // for compatibility purpose
+        DubboShutdownHook.destroyAll();
 
         if (started.compareAndSet(true, false)
                 && destroyed.compareAndSet(false, true)) {
-            // for compatibility purpose
-            DubboShutdownHook.destroyAll();
-
             unregisterServiceInstance();
             unexportMetadataService();
             unexportServices();