From e1edd588b65cbccdead320eef52aa5fd06fb838f Mon Sep 17 00:00:00 2001 From: kairi Date: Mon, 29 May 2023 17:47:59 +0900 Subject: [PATCH] Fix Piped Audio Input Ends Prematurely Co-authored-by: Danny <1695103+Rapptz@users.noreply.github.com> --- discord/player.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/discord/player.py b/discord/player.py index b0079ebcb..9c36c883a 100644 --- a/discord/player.py +++ b/discord/player.py @@ -210,7 +210,8 @@ class FFmpegAudio(AudioSource): # arbitrarily large read size data = source.read(8192) if not data: - self._process.terminate() + if self._stdin is not None: + self._stdin.close() return try: if self._stdin is not None: