From d4ffab9227bd0c1f6885146104e01a09695408c8 Mon Sep 17 00:00:00 2001 From: Daniel Diaz <44991848+DanLCD@users.noreply.github.com> Date: Tue, 16 Apr 2024 13:20:35 -0600 Subject: [PATCH] =?UTF-8?q?Fix=20potential=20`get=5Fwait`=20hang=20if=20qu?= =?UTF-8?q?eue=20only=20receives=20a=20list=20in=20`put=5Fw=E2=80=A6=20(#2?= =?UTF-8?q?98)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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` --- wavelink/queue.py | 1 + 1 file changed, 1 insertion(+) diff --git a/wavelink/queue.py b/wavelink/queue.py index ea4bfd67..121cdc6a 100644 --- a/wavelink/queue.py +++ b/wavelink/queue.py @@ -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: