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>
|
||||
<artifactId>lantern-currentmonitor</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.1.2</version>
|
||||
<version>1.1.3</version>
|
||||
<name>lantern-currentmonitor</name>
|
||||
|
||||
<parent>
|
||||
|
|
|
@ -301,12 +301,14 @@ public class MonitorApp {
|
|||
monitor.stop();
|
||||
pool.shutdown();
|
||||
}, "Monitor Shutdown"));
|
||||
synchronized (monitor) {
|
||||
try {
|
||||
monitor.wait();
|
||||
} catch (InterruptedException _e) {
|
||||
LOG.error("Interrupted, shutting down", _e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static final class PowerPoster implements Runnable {
|
||||
private final long firstPost;
|
||||
|
|
Loading…
Reference in New Issue
Block a user