panrouter 5.4.3 → 5.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/pool-worker.mjs +3 -0
package/package.json
CHANGED
package/pool-worker.mjs
CHANGED
|
@@ -178,6 +178,8 @@ function scheduleReconnect() {
|
|
|
178
178
|
|
|
179
179
|
function handleUpgrade() {
|
|
180
180
|
log("收到主控升级指令,开始升级...", "WARN");
|
|
181
|
+
// 设关闭标志,避免 ws.close → onclose → scheduleReconnect 启动重连
|
|
182
|
+
isShuttingDown = true;
|
|
181
183
|
if (ws) {
|
|
182
184
|
try { ws.close(1000, "Upgrading"); } catch {}
|
|
183
185
|
ws = null;
|
|
@@ -222,6 +224,7 @@ function handleUpgrade() {
|
|
|
222
224
|
}
|
|
223
225
|
|
|
224
226
|
async function doRestart() {
|
|
227
|
+
isShuttingDown = false;
|
|
225
228
|
const serverOk = await ensureServer();
|
|
226
229
|
if (!serverOk) {
|
|
227
230
|
log("代理服务重启失败", "ERR");
|