Fix health check is disabled bug
This commit is contained in:
parent
f1b3e7d82d
commit
0c034d5ee3
@ -428,6 +428,11 @@ public class DistroMapper {
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
if (RunningConfig.getServerPort() <= 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for (String key : distroConfig.keySet()) {
|
for (String key : distroConfig.keySet()) {
|
||||||
for (Server server : distroConfig.get(key)) {
|
for (Server server : distroConfig.get(key)) {
|
||||||
server.alive = System.currentTimeMillis() - server.lastRefTime < Switch.getdistroServerExpiredMillis();
|
server.alive = System.currentTimeMillis() - server.lastRefTime < Switch.getdistroServerExpiredMillis();
|
||||||
|
@ -92,7 +92,7 @@ public class DomainsManager {
|
|||||||
try {
|
try {
|
||||||
leader = RaftCore.getPeerSet().getLeader();
|
leader = RaftCore.getPeerSet().getLeader();
|
||||||
if (leader != null) {
|
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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user