aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2020-11-21 22:52:50 -0500
committerRapptz <[email protected]>2020-11-21 22:53:04 -0500
commit52865dfa99fa589f95c99503515c24537e35dd8c (patch)
tree22e9874308b34d104b23f26a962054d3bb17fc75
parentFix attribute error during rapid disconnects in VoiceClient. (diff)
downloaddiscord.py-52865dfa99fa589f95c99503515c24537e35dd8c.tar.xz
discord.py-52865dfa99fa589f95c99503515c24537e35dd8c.zip
Clear the connected flag when potentially reconnecting the player
Fix #5953
-rw-r--r--discord/voice_client.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/discord/voice_client.py b/discord/voice_client.py
index c97cbabb..675fdae9 100644
--- a/discord/voice_client.py
+++ b/discord/voice_client.py
@@ -365,6 +365,8 @@ class VoiceClient(VoiceProtocol):
self._runner = self.loop.create_task(self.poll_voice_ws(reconnect))
async def potential_reconnect(self):
+ # Attempt to stop the player thread from playing early
+ self._connected.clear()
self.prepare_handshake()
self._potentially_reconnecting = True
try: