Fixes logical judgment expression #5683 (#5685)

* One aspect of code quality is to have better expressions.

* Update ClientBeatProcessor.java

* Update ClientBeatProcessor.java
This commit is contained in:
mingyang feng 2021-05-14 09:39:36 +08:00 committed by GitHub
parent 40cb9ecc43
commit 64601e0581
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -81,8 +81,7 @@ public class ClientBeatProcessor implements Runnable {
Loggers.EVT_LOG.debug("[CLIENT-BEAT] refresh beat: {}", rsInfo.toString());
}
instance.setLastBeat(System.currentTimeMillis());
if (!instance.isMarked()) {
if (!instance.isHealthy()) {
if (!instance.isMarked() && !instance.isHealthy()) {
instance.setHealthy(true);
Loggers.EVT_LOG
.info("service: {} {POS} {IP-ENABLED} valid: {}:{}@{}, region: {}, msg: client beat ok",
@ -94,4 +93,3 @@ public class ClientBeatProcessor implements Runnable {
}
}
}
}