Skip to content

fix(mobile): give up on an unanswered connection check after 10 s - #49

Merged
Delta1035 merged 1 commit into
mainfrom
Delta1035/connect-timeout
Oct 10, 2026
Merged

Delta1035 merged 1 commit into
mainfrom
Delta1035/connect-timeout

Conversation

@Delta1035

Copy link
Copy Markdown
Owner

Closes #47

验证结果:

  • pnpm check 通过(shared 115、desktop 669 个测试;新增 2 个:无响应时 session() 以 TIMEOUT 失败、超时前返回正常会话)。
  • pnpm e2e 通过(34 passed,2 skipped)。
  • 模拟器(debug APK,本分支):
    • 连接一个「接受 TCP 但不回应」的地址:「正在连接…」下方显示「更换桌面端」,约 10 秒后显示「DevHub 没有响应…」,并给出重试 / 更换桌面端。
    • 连接中点「更换桌面端」,改填真实桌面端后能连上;强制停止后重新打开,直接进入项目页。
  • 修复前(v1.4.0 正式 APK):强制停止 / 返回键后重开均正常,说明保存的连接能正确恢复;问题出在网络不可达时没有超时。

未验证:真机上卡住的具体诱因(推测是桌面只监听 Tailscale 地址,而手机 Tailscale 未连上或正在重连),需要用新版 APK 在真机上确认。只改了网页代码,原生部分没动,不需要调 minVersionCode。

When the saved desktop was unreachable and its packets were dropped
(e.g. the desktop listens on a Tailscale address and the phone's
Tailscale is not up yet), reopening the Android app stayed on
"connecting" until the platform's TCP timeout, minutes on a phone, with
no button to retry or pick another desktop.

The session check now fails with TIMEOUT after 10 s, which leads to the
offline page (retry / change desktop), and the connecting screen offers
"change desktop" too.

Closes #47
@Delta1035
Delta1035 merged commit ce1ff55 into main Oct 10, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Android:连接检查无超时,再次打开时卡在「正在连接」

1 participant