From 4a6881df4a124cc7f4a8b8573bc2e64bccae933a Mon Sep 17 00:00:00 2001 From: nathan Date: Sat, 10 Nov 2018 11:34:19 +0100 Subject: [PATCH] Now close the keepalive thread for macosx when removing the system tray --- src/dorkbox/systemTray/ui/awt/_AwtTray.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/dorkbox/systemTray/ui/awt/_AwtTray.java b/src/dorkbox/systemTray/ui/awt/_AwtTray.java index 61eb677..9cbe7cc 100755 --- a/src/dorkbox/systemTray/ui/awt/_AwtTray.java +++ b/src/dorkbox/systemTray/ui/awt/_AwtTray.java @@ -230,6 +230,13 @@ class _AwtTray extends Tray { }); super.remove(); + + // make sure this thread doesn't keep the JVM alive anymore + if (keepAliveThread != null) { + synchronized (keepAliveLock) { + keepAliveLock.notifyAll(); + } + } } };