SpotiClub Patch v0.2.0
Some checks failed
CodeQL / Analyze (python) (push) Has been cancelled

This commit is contained in:
unknown
2025-12-18 05:06:42 +01:00
parent 99ac394b8e
commit 77227b9e23

View File

@@ -1307,10 +1307,6 @@ class Session(Closeable, MessageListener, SubListener):
for attempt in range(1, max_attempts + 1):
try:
# Inform the user about each connection attempt so it is
# visible in the console (e.g. when called from Zotify).
# Only show attempt counters after the first failure; the
# initial attempt is shown without numbering.
if attempt == 1:
connect_msg = "Connecting to Spotify..."
else:
@@ -2303,6 +2299,7 @@ class Session(Closeable, MessageListener, SubListener):
ap_address = address.split(":")[0]
ap_port = int(address.split(":")[1])
sock = socket.socket()
sock.settimeout(15)
# Retry logic: try up to 3 times with 2 seconds between attempts
# for transient connection errors (e.g., ECONNREFUSED / error 111).