NTP: don't call shutdownNow() on null instanceExecutor

When using fixed NTP offset, e.g. via "testNtpoffset" in settings.json,
Controller calls NTP.shutdownNow() which throws a NPE because
NTP.instanceExecutor is null.
This commit is contained in:
catbref 2020-05-06 11:58:02 +01:00
parent f0ff77cd31
commit 2ab695f308

View File

@ -129,7 +129,8 @@ public class NTP implements Runnable {
}
public static void shutdownNow() {
instanceExecutor.shutdownNow();
if (instanceExecutor != null)
instanceExecutor.shutdownNow();
}
public static synchronized void setFixedOffset(Long offset) {