Skip to content

Commit ba9bc15

Browse files
committed
Add connection state wait when moving channels
1 parent b7cc6f5 commit ba9bc15

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

wavelink/player.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,14 @@ async def _disconnected_wait(self, code: int, by_remote: bool) -> None:
178178
return
179179

180180
self._connected = False
181-
await self._reconnecting.wait()
181+
self._connection_event.clear()
182+
183+
try:
184+
async with async_timeout.timeout(1):
185+
await self._connection_event.wait()
186+
except TimeoutError:
187+
self._connected = False
188+
return
182189

183190
if self._connected:
184191
return

0 commit comments

Comments
 (0)