mirror of
https://github.com/zyphlar/LanternPowerMonitor.git
synced 2024-03-08 14:07:47 +00:00
Synchronize around the wait call that keeps the service running.
This commit is contained in:
parent
bf648f069c
commit
95a554422d
|
@ -2,7 +2,7 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>lantern-currentmonitor</artifactId>
|
<artifactId>lantern-currentmonitor</artifactId>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<version>1.1.2</version>
|
<version>1.1.3</version>
|
||||||
<name>lantern-currentmonitor</name>
|
<name>lantern-currentmonitor</name>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
|
|
|
@ -301,10 +301,12 @@ public class MonitorApp {
|
||||||
monitor.stop();
|
monitor.stop();
|
||||||
pool.shutdown();
|
pool.shutdown();
|
||||||
}, "Monitor Shutdown"));
|
}, "Monitor Shutdown"));
|
||||||
try {
|
synchronized (monitor) {
|
||||||
monitor.wait();
|
try {
|
||||||
} catch (InterruptedException _e) {
|
monitor.wait();
|
||||||
LOG.error("Interrupted, shutting down", _e);
|
} catch (InterruptedException _e) {
|
||||||
|
LOG.error("Interrupted, shutting down", _e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user