kylixs commented on a change in pull request #8954:
URL: https://github.com/apache/dubbo/pull/8954#discussion_r735309115



##########
File path: 
dubbo-common/src/main/java/org/apache/dubbo/rpc/model/FrameworkModel.java
##########
@@ -142,7 +148,11 @@ synchronized void removeApplication(ApplicationModel 
model) {
 
     synchronized void tryDestroy() {
         if (applicationModels.size() == 0) {
-            destroy();
+            synchronized (destroyingLock) {

Review comment:
       `destroyingLock` destroyingLock is redundant, there already have 
synchronized lock on FrameworkModel instance: 
   ```java
   synchronized void addApplication(ApplicationModel applicationModel) {
   ...
   }
   
   synchronized void tryDestroy() {
   ...
   }
   
   ```




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to