dsh-ios v0.1.0-rc.5
Pre-releasedsh-ios v0.1.0-rc.5
设备变慢,不该变成插件卡死。/ A busy device should slow us down, not lock us out.
🐛 修复 / Fixed
-
设备繁忙时 WDA 调用持续超时 / WDA calls timing out forever once the device is busy(#2)—— WDA 服务端串行处理请求,而客户端超时不取消设备上已在执行的命令(断开 socket 只断连接)。于是设备一忙(播放视频是报告中的场景),就没有任何背压:新请求继续满速发出、在设备端排更长的队、每个再烧满 30 秒预算。一次"变慢"因此变成
window/size永远超时。现在廉价 GET(window/size、orientation)的超时预算是 5 秒而非 30 秒,且任一超时会开启 10 秒忙冷却,期间新请求立即以[wda-busy]快速失败——"一直超时"变成"这次失败、稍后重试",对无响应设备的在途请求上界压到 1。/ WDA serves requests serially and a client-side timeout does not cancel the command already running on the device, so nothing pushed back once the device got busy. Cheap GETs now time out in 5 s, and any timeout opens a 10-second cooldown in which new requests fail immediately as busy. -
画面定格且不自愈 / The picture froze with no indication and no recovery(#2)—— 真机画面经 MJPEG 代理转发,而代理层没有空闲看门狗:上游一个字节都不来、但连接没断时,浏览器的
<img>永远不会触发onError,最后一帧就永久留在屏幕上。现在 8 秒无上游数据即主动断流,变成面板本就会处理的错误 → 自动重连,设备恢复后自行回到实时画面。/ The MJPEG proxy had no idle watchdog, so an upstream that stops sending bytes without closing the connection left the browser's<img>with no error to fire. Eight seconds of silence now tears the stream down, surfacing as an error the panel already knows how to retry.
🔧 改进 / Changed
window/size跨调用方共享缓存(旋转或会话重建时失效)。该值一个会话内只在旋转时变,此前每条工具路径每次都要重新问设备;卡顿期手势还能回退到几秒内的旧值继续可用。/window/sizegets a cache shared across callers — it only changes on rotation, yet every tool path re-asked the device for it.- 面板控制请求加在途护栏:1 个在途 + 1 个排队(最新手势胜出),点击卡住的画面不再把请求堆到接不住的设备上。/ Control requests gained an in-flight guard — one out, one queued, newest gesture wins.
🧪 验证 / Verification
全套测试 744 步、0 失败;新增测试覆盖快速超时、冷却期快速失败与过期恢复、传输层重置不触发冷却、共享缓存的三条失效路径、尺寸回退落点、停滞流在预算内被断开、以及控制请求队列的最新胜出与失败不破坏链路。
坦白一句:此修复未在真实设备上复现原始故障 —— 我们无法稳定重现"播放视频时 WDA 变慢"。以上是代码层面的缺陷分析与针对性测试,真实环境的验证仍然欢迎(升级后超时消息会带 [wda-busy] 标记或 timed out after 5000 ms)。/ Honest caveat: the original failure was not reproduced on real hardware. The fix rests on code analysis and targeted tests; confirmation from a real device is still welcome.
🙏 致谢 / Credit
感谢 @godsoul 在 #2 中的报告——"window/size 持续超时"与"画面不同步"这两条线索,恰好各自指向一个独立的结构性缺陷。/ Thanks to @godsoul for #2: the two symptoms turned out to be two independent defects.
📦 安装 / Install
dsh plugin --profile web add @zseven-w/dsh-ios@latest
dsh webFull Changelog: v0.1.0-rc.4...v0.1.0-rc.5