ssh-net 26.10.62 → 26.10.63

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/CHANGELOG.md CHANGED
@@ -4,6 +4,14 @@
4
4
  跨月从 1 开始;历史跳号不补、不另维护累计发包数。发布 = 改版本号 +
5
5
  CHANGELOG + 发 GitHub Release,Actions 跑测试后 npm publish。
6
6
 
7
+ ## [26.10.63] - 2026-10-29
8
+
9
+ ### 修复
10
+
11
+ - edge 的 link 任务已注册但进程已退出时,stop 不再误发 launchctl kill;查询后
12
+ 进程自然退出导致的 No process to signal 也按已停止处理,重复 stop 与
13
+ at byted 可正常收尾
14
+
7
15
  ## [26.10.62] - 2026-10-25
8
16
 
9
17
  ### 修复
@@ -1,6 +1,6 @@
1
- // edge link job 的进程收束:在册才 launchctl kill TERM,轮询确认纯 ssh job
1
+ // edge link job 的进程收束:在册且有进程才 launchctl kill TERM,轮询确认纯 ssh job
2
2
  // 真退出(link-core 是 exec ssh,信号直达,正常亚秒级)。不碰开关——删哪些
3
- // 开关是 stop 的命令语义。未装 link(label 不在册)直接 gone。超时报错给手工
3
+ // 开关是 stop 的命令语义。未装 link 或进程已退出直接 gone。超时报错给手工
4
4
  // 排障命令,绝不自动 KILL。同步 CLI 用 Atomics.wait 节流。
5
5
  import * as launchd from './launchd.mjs';
6
6
 
@@ -24,12 +24,12 @@ function isGone(ctx, label) {
24
24
  * @returns {{gone:boolean, label:string}}
25
25
  */
26
26
  export function reapEdgeLink(ctx, label) {
27
- if (!launchd.printState(ctx.runner, ctx.uid, label, true).registered)
28
- return { gone: true, label };
27
+ if (isGone(ctx, label)) return { gone: true, label };
29
28
 
30
29
  const killed = launchd.killJob(ctx.runner, ctx.uid, label, 'TERM');
30
+ // 查询后进程可能自然退出:服务消失或没有进程都已是目标态,其他错误仍抛出
31
31
  if (killed.code !== 0 && killed.code !== 113
32
- && !/Could not find service/.test(killed.stderr ?? ''))
32
+ && !/Could not find service|No process to signal/.test(killed.stderr ?? ''))
33
33
  throw new Error(`launchctl kill 失败(${label}):${killed.stderr.trim() || `exit ${killed.code}`}`);
34
34
  const end = Date.now() + WAIT_MS;
35
35
  while (Date.now() < end) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ssh-net",
3
- "version": "26.10.62",
3
+ "version": "26.10.63",
4
4
  "type": "module",
5
5
  "description": "个人 SSH 组网:IPv6 直连优先,中继自动兜底,断开后有界重试、按需恢复",
6
6
  "bin": {