Skip to content
Snippets Groups Projects
Commit ee7498a6 authored by René Schöne's avatar René Schöne
Browse files

Minor fix using the corrent executor.

parent 3473de36
Branches
No related tags found
No related merge requests found
......@@ -18,7 +18,6 @@ import java.nio.ByteBuffer;
import java.nio.DoubleBuffer;
import java.util.HashSet;
import java.util.Set;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import org.eclipse.smarthome.core.library.types.DecimalType;
......@@ -41,8 +40,6 @@ public abstract class AbstractSmartWatchHandler extends AbstractMqttHandler {
private static Set<String> seenUnsupportedCategories;
private static ScheduledExecutorService executor;
public AbstractSmartWatchHandler(Thing thing, ConfigurationHolder configurationHolder) {
super(thing, configurationHolder);
maybeSetupStatics();
......@@ -55,7 +52,11 @@ public abstract class AbstractSmartWatchHandler extends AbstractMqttHandler {
seenUnsupportedCategories.clear();
}
};
if (executor != null) {
executor.scheduleAtFixedRate(command, 0, timeout, TimeUnit.SECONDS);
} else {
logger.warn("Did not schedule reset thread for unsupported categories.");
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment