Skip to content

Commit a2d6318

Browse files
committed
#148 Change locking method
1 parent 30a8c07 commit a2d6318

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

librespot/audio/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def check_availability(self, chunk: int, wait: bool, halted: bool) -> None:
133133
self.stream_read_halted(chunk, int(time.time() * 1000))
134134
self.chunk_exception = None
135135
self.wait_for_chunk = chunk
136-
self.wait_lock.wait()
136+
self.wait_lock.wait_for(lambda: self.available_chunks()[chunk])
137137
if self.closed:
138138
return
139139
if self.chunk_exception is not None:

0 commit comments

Comments
 (0)