Make wait_for_sync async

This commit is contained in:
2025-06-17 15:15:27 +02:00
parent a20fbdb295
commit 6455415edd
2 changed files with 18 additions and 5 deletions

View File

@@ -188,7 +188,7 @@ async def periodic_sync_check():
# Attempt resync with progressively longer timeouts based on consecutive failures
timeout = min(5 + (_consecutive_sync_failures * 2), 30) # Increase timeout up to 30 seconds
if _payment_handler.wait_for_sync(timeout_seconds=timeout):
if await _payment_handler.wait_for_sync(timeout_seconds=timeout):
logger.info("SDK resync successful")
_last_sync_time = time.time()
_consecutive_sync_failures = 0