Fix health check is disabled bug

This commit is contained in:
nkorange 2018-10-17 20:26:15 +08:00
parent f1b3e7d82d
commit 0c034d5ee3
2 changed files with 6 additions and 1 deletions

View File

@ -428,6 +428,11 @@ public class DistroMapper {
@Override
public void run() {
try {
if (RunningConfig.getServerPort() <= 0) {
return;
}
for (String key : distroConfig.keySet()) {
for (Server server : distroConfig.get(key)) {
server.alive = System.currentTimeMillis() - server.lastRefTime < Switch.getdistroServerExpiredMillis();

View File

@ -92,7 +92,7 @@ public class DomainsManager {
try {
leader = RaftCore.getPeerSet().getLeader();
if (leader != null) {
Loggers.SRV_LOG.info("[AUTO-INIT] no leader now, sleep 3 seconds and try again.");
Loggers.SRV_LOG.info("[AUTO-INIT] leader is: " + leader.ip);
break;
}