新增 强制自动重连机制

This commit is contained in:
Suwings 2022-05-23 16:37:03 +08:00
parent 3fe39b3055
commit c279a49844
2 changed files with 4 additions and 4 deletions

View File

@ -70,9 +70,9 @@ export class RemoteServiceConfig {
public apiKey = "";
connectOpts: SocketIOClient.ConnectOpts = {
multiplex: false,
reconnectionDelayMax: 3000,
timeout: 3000,
reconnectionDelayMax: 1000 * 3,
timeout: 1000 * 3,
reconnection: true,
reconnectionAttempts: 1000
reconnectionAttempts: 20
};
}

View File

@ -144,7 +144,7 @@ class RemoteServiceSubsystem extends UniversalRemoteSubsystem<RemoteService> {
this.services?.forEach((v) => {
if (v && v.available === false) {
logger.warn(
`[守护进程状态检查] 检测到守护进程 ${v.config.remarks} ${v.config.ip}:${v.config.port} 状态异常,正在重置并连接`
`检测到守护进程 ${v.config.remarks} ${v.config.ip}:${v.config.port} 状态异常,正在重置并连接`
);
return v.connect();
}