Skip to content

wanctl v0.8.2

Choose a tag to compare

@github-actions github-actions released this 09 Sep 09:25
· 33 commits to main since this release
66694d0

v0.8.2 — 升级时不会再把设备停下来却起不回来

  • wanctl stop 现在等 agent 真正放手才返回(最多 10 秒,超时就报错并且不再往下走)。以前它只管发停止信号就返回,于是 wanctl update 停旧 agent、换二进制、起新 agent 这一串里,新 agent 会撞上还没退干净的旧 agent 占着的配置目录锁,拿不到锁就直接退出——而上一步已经打印了「✓ 服务已转后台」。本机上真出过一次:设备从中继上掉线 50 分钟,直到手动 wanctl start 才回来。
  • agent 抢不到锁时会先等一小会儿(最多 5 秒)再退出,并且不再报「another agent is already running (pid 自己)」——wanctl start 是在子进程加锁之前就把它的 pid 写进 agent.pid 的,输不掉这一局的 agent 从那里读到的正是自己的号码,那句提示会让人去找一个根本不存在的进程。

无需任何操作;wanctl status 里「未运行」那行的提示也从 wanctl 改成了 wanctl start