Skip to content

Commit ce35c2a

Browse files
committed
bandaid fix for #331
1 parent 4d2a143 commit ce35c2a

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

librespot/core.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1065,7 +1065,11 @@ def connect(self) -> None:
10651065
acc.write_int(2 + 4 + len(client_hello_bytes))
10661066
acc.write(client_hello_bytes)
10671067
# Read APResponseMessage
1068-
ap_response_message_length = self.connection.read_int()
1068+
try:
1069+
ap_response_message_length = self.connection.read_int()
1070+
except struct.error:
1071+
time.sleep(.1)
1072+
ap_response_message_length = self.connection.read_int()
10691073
acc.write_int(ap_response_message_length)
10701074
ap_response_message_bytes = self.connection.read(
10711075
ap_response_message_length - 4)

0 commit comments

Comments
 (0)