From f561214804c1eeb4787776e30c6a769e0e5420fd Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Mon, 24 Aug 2026 20:16:05 +0330 Subject: [PATCH 1/2] fix : update _attempt_with_retries function --- ipspot/utils.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ipspot/utils.py b/ipspot/utils.py index 427e15f..e2c6122 100644 --- a/ipspot/utils.py +++ b/ipspot/utils.py @@ -91,10 +91,14 @@ def _attempt_with_retries( next_delay = retry_delay for attempt in range(max_retries + 1): result = func(**kwargs) + if result["status"]: - break - time.sleep(next_delay) - next_delay *= backoff_factor + return result + + if attempt < max_retries: + time.sleep(next_delay) + next_delay *= backoff_factor + return result From ee88052e56329084622a11b7f07a3000b0fc008f Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Mon, 24 Aug 2026 20:16:50 +0330 Subject: [PATCH 2/2] doc : update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0819f3a..6dcf599 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - CLI modified - Dependencies structure modified - Test system modified +- `_attempt_with_retries` function modified ## [0.8] - 2026-02-05 ### Added - Support [wtfismyip.com](https://wtfismyip.com/json) IPv6 API