From ee45cee8e36a2b5e80dce72e6dfd84885849e9e3 Mon Sep 17 00:00:00 2001 From: Admin Date: Fri, 22 Apr 2016 14:00:47 -0500 Subject: [PATCH] Fixed error handling in for loops --- src/main/java/com/bwssystems/HABridge/hue/HueMulator.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/bwssystems/HABridge/hue/HueMulator.java b/src/main/java/com/bwssystems/HABridge/hue/HueMulator.java index 734ff89..76f11d7 100644 --- a/src/main/java/com/bwssystems/HABridge/hue/HueMulator.java +++ b/src/main/java/com/bwssystems/HABridge/hue/HueMulator.java @@ -543,6 +543,7 @@ public class HueMulator implements HueErrorStringSet { } catch (IOException e) { log.warn("Could not send UDP Datagram packet for request.", e); responseString = "[{\"error\":{\"type\": 6, \"address\": \"/lights/" + lightId + "\",\"description\": \"Error on calling out to device\", \"parameter\": \"/lights/" + lightId + "state\"}}]"; + i = callItems.length+1; } } } @@ -568,6 +569,7 @@ public class HueMulator implements HueErrorStringSet { if (doHttpRequest(anUrl, device.getHttpVerb(), device.getContentType(), body) == null) { log.warn("Error on calling url to change device state: " + anUrl); responseString = "[{\"error\":{\"type\": 6, \"address\": \"/lights/" + lightId + "\",\"description\": \"Error on calling url to change device state\", \"parameter\": \"/lights/" + lightId + "state\"}}]"; + i = callItems.length+1; } } }