From f4f91c0b85b0dc7cad7e6deb7400c446857d6bac Mon Sep 17 00:00:00 2001 From: Johannes Mockenhaupt Date: Wed, 6 Sep 2017 12:53:47 +0200 Subject: [PATCH] Add TODO. --- .../androidaps/plugins/PumpCombo/scripter/RuffyScripter.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/scripter/RuffyScripter.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/scripter/RuffyScripter.java index 2066244d3a..f2f08820e0 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/scripter/RuffyScripter.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/scripter/RuffyScripter.java @@ -484,6 +484,9 @@ public class RuffyScripter { // === pump ops === public Menu getCurrentMenu() { long timeout = System.currentTimeMillis() + 5 * 1000; + // TODO this is probably due to a disconnect and rtDisconnect having nulled currentMenu. + // This here might just work, but needs a more controlled approach when implementing + // something to deal with connection loses while (currentMenu == null) { if (System.currentTimeMillis() > timeout) { throw new CommandException().message("Unable to read current menu");