diff --git a/librespot/core.py b/librespot/core.py index 3c2afb0..14e57b9 100644 --- a/librespot/core.py +++ b/librespot/core.py @@ -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).