Update __init__.py
authorMarcel van der Veldt <m.vanderveldt@outlook.com>
Sun, 27 Sep 2020 18:02:36 +0000 (20:02 +0200)
committerMarcel van der Veldt <m.vanderveldt@outlook.com>
Sun, 27 Sep 2020 18:02:36 +0000 (20:02 +0200)
music_assistant/providers/group_player/__init__.py

index 9f43eef0152487008ce244f6f5321bda019e3e8e..206285fd55995c106019acbd7b00ab4b292a8370 100644 (file)
@@ -344,8 +344,8 @@ class GroupPlayer(Player):
             )
             self.connected_clients.pop(child_player_id, None)
             await sox_proc.communicate()
-            sox_proc.terminate()
             if sox_proc and sox_proc.returncode is None:
+                sox_proc.terminate()
                 await sox_proc.wait()
         else:
             self.connected_clients.pop(child_player_id, None)