Skip to content

Commit 5c8e4cf

Browse files
committed
Fix to prevent infinite loop
1 parent 67381b0 commit 5c8e4cf

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

spotify_monitor.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1807,6 +1807,9 @@ def spotify_get_access_token_from_sp_dc(sp_dc: str):
18071807
debug_print(f"TOTP secrets unavailable: {e}")
18081808
if fetch_and_update_secrets():
18091809
debug_print("TOTP secrets updated, retrying token refresh immediately")
1810+
retry += 1
1811+
if retry < max_retries:
1812+
time.sleep(TOKEN_RETRY_TIMEOUT)
18101813
continue
18111814
raise RuntimeError(f"Failed to obtain TOTP secrets for token refresh: {e}")
18121815
except Exception as e:

0 commit comments

Comments
 (0)