fix server election

This commit is contained in:
lwc1 2021-03-27 14:32:12 +08:00
parent cfb05d9871
commit c31f10b3c1

View File

@ -93,7 +93,7 @@ public class ServerElectionService {
// 可能上一台机器已经完成了Server选举需要再次判断
AppInfoDO appInfo = appInfoRepository.findById(appId).orElseThrow(() -> new RuntimeException("impossible, unless we just lost our database."));
String address = activeAddress(originServer, downServerCache, protocol);
String address = activeAddress(appInfo.getCurrentServer(), downServerCache, protocol);
if (StringUtils.isNotEmpty(address)) {
return address;
}