This commit is contained in:
@@ -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).
|
||||
|
||||
Reference in New Issue
Block a user