mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-12 03:42:08 +00:00
fix(gateway): use monotonic deadlines in QR onboarding flows
This commit is contained in:
parent
73d6371762
commit
6e8f1e09a9
6 changed files with 105 additions and 13 deletions
|
|
@ -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, {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue