fix(gateway): use monotonic deadlines in QR onboarding flows

This commit is contained in:
Zyproth 2026-05-05 19:51:51 +03:00 committed by Teknium
parent 73d6371762
commit 6e8f1e09a9
6 changed files with 105 additions and 13 deletions

View file

@ -1037,11 +1037,11 @@ async def qr_login(
except Exception as _qr_exc:
print(f"(终端二维码渲染失败: {_qr_exc},请直接打开上面的二维码链接)")
deadline = time.time() + timeout_seconds
deadline = time.monotonic() + timeout_seconds
current_base_url = ILINK_BASE_URL
refresh_count = 0
while time.time() < deadline:
while time.monotonic() < deadline:
try:
status_resp = await _api_get(
session,