catch the thread

This commit is contained in:
Milos Kozak 2018-04-05 23:28:17 +02:00
parent e5bf36bfe3
commit a3811b503f

View file

@ -150,13 +150,13 @@ public abstract class PluginBase {
protected void onStart() { protected void onStart() {
if (getType() == PluginType.PUMP) { if (getType() == PluginType.PUMP) {
try {
new Thread(() -> { new Thread(() -> {
SystemClock.sleep(3000); SystemClock.sleep(3000);
try {
ConfigBuilderPlugin.getCommandQueue().readStatus("Pump driver changed.", null); ConfigBuilderPlugin.getCommandQueue().readStatus("Pump driver changed.", null);
}).start();
} catch (Exception ignored) { // Thread fail to start in tests } catch (Exception ignored) { // Thread fail to start in tests
} }
}).start();
} }
} }