From 56fa0a6b99eafee99cb09e821bef56cbc05409ed Mon Sep 17 00:00:00 2001 From: Ilchikaev Amir Date: Sat, 31 Aug 2024 11:55:22 +0500 Subject: [PATCH] FIX Infinite loop when getting promo code When a promo code from a game cannot be acquired in "max_attempts" times, loop restarts and bot tries to get promo code from the same game. Fix provided here ensures that when bot exhausts all attempts, it skips to another game --- bot/core/tapper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/core/tapper.py b/bot/core/tapper.py index 0cc4f39e..59cb8a1d 100644 --- a/bot/core/tapper.py +++ b/bot/core/tapper.py @@ -348,7 +348,7 @@ async def run(self, proxy: str | None) -> None: proxy=proxy) if not promo_code: - continue + break profile_data, promo_state = await apply_promo(http_client=http_client, promo_code=promo_code)