BraveheartStone commented on issue #6144:
URL: https://github.com/apache/shenyu/issues/6144#issuecomment-3266566287
追踪代码发现问题出在了这个位置:`org/apache/shenyu/registry/nacos/NacosInstanceRegisterRepository.java:201
`
我看这段代码在 2025.3.14 更新为。这样写是出于什么原因的考虑呢?
```java
// status 0:true, 1:false
upstreamJson.addProperty("status", instance.isHealthy() ? 0 : 1);
```
正确的写法应为:
```java
upstreamJson.addProperty("status", instance.isHealthy() ? 1 : 0);
```
<img width="945" height="442" alt="Image"
src="https://github.com/user-attachments/assets/7ca3cef3-d3c9-46d5-be8d-9acee617e3ff"
/>
翻看 nacos 源代码,instance.isHealthy() 为 true 才是实例的健康状态。
--
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]