From 219aa747c965533eb5f11724fe6483388d29bc93 Mon Sep 17 00:00:00 2001 From: sentriz Date: Mon, 9 Oct 2023 22:14:33 +0100 Subject: [PATCH] kill jukebox process on quit --- jukebox/jukebox.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/jukebox/jukebox.go b/jukebox/jukebox.go index 64a866f0..47eae365 100644 --- a/jukebox/jukebox.go +++ b/jukebox/jukebox.go @@ -313,6 +313,10 @@ func (j *Jukebox) Quit() error { go func() { _, _ = j.conn.Call("quit") }() + + time.Sleep(250 * time.Millisecond) + _ = j.cmd.Process.Kill() + if err := j.conn.Close(); err != nil { return fmt.Errorf("close: %w", err) }