chenshouye168 commented on code in PR #4670:
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/4670#discussion_r1908593647


##########
service-registry/registry-nacos/src/main/java/org/apache/servicecomb/registry/nacos/NacosDiscoveryInstance.java:
##########
@@ -57,7 +57,11 @@ public NacosDiscoveryInstance(Instance instance, String 
application, String serv
 
   @Override
   public MicroserviceInstanceStatus getStatus() {
-    return instance.isEnabled() ? MicroserviceInstanceStatus.UP : 
MicroserviceInstanceStatus.DOWN;
+    if (instance.isEnabled()){
+      return 
MicroserviceInstanceStatus.valueOf(instance.getMetadata().get(NacosConst.NACOS_STATUS));

Review Comment:
   The new version will definitely have status in metadata, so Returns up if 
status is not found in the old version in metadata.



-- 
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]

Reply via email to