mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-22 16:51:59 +00:00
Move ffmpeg process cleanup to player thread
This commit is contained in:
parent
2ef38107d8
commit
f1736bc08f
@ -122,11 +122,13 @@ class ProcessPlayer(StreamPlayer):
|
||||
client._connected, client.play_audio, after, **kwargs)
|
||||
self.process = process
|
||||
|
||||
def stop(self):
|
||||
def run(self):
|
||||
super().run()
|
||||
|
||||
self.process.kill()
|
||||
if self.process.poll() is None:
|
||||
self.process.communicate(timeout=0.100)
|
||||
super().stop()
|
||||
self.process.communicate()
|
||||
|
||||
|
||||
class VoiceClient:
|
||||
"""Represents a Discord voice connection.
|
||||
|
Loading…
x
Reference in New Issue
Block a user