补齐连接反复断开和缓存失败重试边界

This commit is contained in:
root
2026-09-08 12:48:24 +08:00
parent 60facae9b5
commit a9ba631847
2 changed files with 10 additions and 0 deletions
@@ -386,6 +386,13 @@ public class RemoteService {
} finally {
monitorSocket = null;
monitoring.set(false);
// A connection may flap while the previous monitor is still exiting.
if (!stopping && isDead()) {
try { networkGroup.next().schedule(this::startMonitor, 5, TimeUnit.SECONDS); }
catch (java.util.concurrent.RejectedExecutionException e) {
if (!stopping) log.warn("安排节点监听重试失败", e);
}
}
}
}