From c5b70859438b22e0e186c57037aee02adde5399b Mon Sep 17 00:00:00 2001 From: xengineering Date: Fri, 8 Nov 2024 19:34:51 +0100 Subject: Fix zombie ffmpeg process In case of closing the UI window while the player was active the `ffmpeg` process continued while soundbox-app was closed. This is highly unwanted behavior since the user is not able to stop it without advanced tools. Waiting properly for the player context to be done solves the issue. --- main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.go b/main.go index 47429cf..060f76c 100644 --- a/main.go +++ b/main.go @@ -75,7 +75,9 @@ func (ui *Ui) Cleanup() { defer ui.State.Unlock() if ui.State.PlayerCancel != nil { + done := ui.State.PlayerContext.Done() ui.State.PlayerCancel() + <-done } } -- cgit v1.2.3-70-g09d2