Skip to content

Commit

Permalink
Fix potential get_wait hang if queue only receives a list in `put_w… (
Browse files Browse the repository at this point in the history
#298)

* Fix potential `get_wait` hang if queue only receives a list in `put_wait`

`get_wait` would never have its waiter woken up if a list were to be passed in an atomic `put_wait` with no subsequent calls of another type.

* Move fix to `put_wait` instead of `put`
  • Loading branch information
DanLCD authored Apr 16, 2024
1 parent db0aa3b commit d4ffab9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions wavelink/queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,7 @@ async def put_wait(self, item: list[Playable] | Playable | Playlist, /, *, atomi
if atomic:
self._check_atomic(item)
self._items.extend(item)
self._wakeup_next()
return len(item)

for track in item:
Expand Down

0 comments on commit d4ffab9

Please sign in to comment.