diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaR/services/DanaRExecutionService.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaR/services/DanaRExecutionService.java index a025e1fc61..a7da6b600e 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaR/services/DanaRExecutionService.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaR/services/DanaRExecutionService.java @@ -433,7 +433,7 @@ public class DanaRExecutionService extends Service { } final Object o = new Object(); - ConfigBuilderPlugin.getCommandQueue().readStatus("bolusingInterrupted", new Callback() { + ConfigBuilderPlugin.getCommandQueue().independentConnect("bolusingInterrupted", new Callback() { @Override public void run() { if (danaRPump.lastBolusTime.getTime() > System.currentTimeMillis() - 60 * 1000L) { // last bolus max 1 min old diff --git a/app/src/main/java/info/nightscout/androidaps/queue/CommandQueue.java b/app/src/main/java/info/nightscout/androidaps/queue/CommandQueue.java index 44e3f5f791..eea2635ae7 100644 --- a/app/src/main/java/info/nightscout/androidaps/queue/CommandQueue.java +++ b/app/src/main/java/info/nightscout/androidaps/queue/CommandQueue.java @@ -135,6 +135,13 @@ public class CommandQueue { } } + public static void independentConnect(String reason, Callback callback) { + CommandQueue tempCommandQueue = new CommandQueue(); + tempCommandQueue.readStatus(reason, callback); + QueueThread tempThread = new QueueThread(tempCommandQueue); + tempThread.start(); + } + // returns true if command is queued public boolean bolus(DetailedBolusInfo detailedBolusInfo, Callback callback) { if (isRunning(Command.CommandType.BOLUS)) {