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

@ -4591,12 +4591,12 @@ def _poll_registration(
Returns dict with app_id, app_secret, domain, open_id on success.
Returns None on failure.
"""
deadline = time.time() + expire_in
deadline = time.monotonic() + expire_in
current_domain = domain
domain_switched = False
poll_count = 0
while time.time() < deadline:
while time.monotonic() < deadline:
base_url = _accounts_base_url(current_domain)
try:
res = _post_registration(base_url, {