From b0dc7af5c2867009fb6a516e71b8c06f5c28a23a Mon Sep 17 00:00:00 2001 From: "Jan N. Klug" Date: Mon, 4 May 2015 11:22:21 +0200 Subject: [PATCH] Fix issue #1845, try 2 Following teichstas comments --- .../binding/fritzbox/internal/FritzboxBinding.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bundles/binding/org.openhab.binding.fritzbox/src/main/java/org/openhab/binding/fritzbox/internal/FritzboxBinding.java b/bundles/binding/org.openhab.binding.fritzbox/src/main/java/org/openhab/binding/fritzbox/internal/FritzboxBinding.java index 3496d538fde..3a95e2ac864 100644 --- a/bundles/binding/org.openhab.binding.fritzbox/src/main/java/org/openhab/binding/fritzbox/internal/FritzboxBinding.java +++ b/bundles/binding/org.openhab.binding.fritzbox/src/main/java/org/openhab/binding/fritzbox/internal/FritzboxBinding.java @@ -59,6 +59,7 @@ * and outgoing calls, as well as for connections and disconnections. * * @author Kai Kreuzer + * @author Jan N. Klug * @since 0.7.0 */ public class FritzboxBinding extends @@ -451,7 +452,11 @@ public void run() { } } } catch (IOException e) { - logger.error("Lost connection to FritzBox", e); + if (interrupted) { + logger.info("Lost connection to Fritzbox because of interrupt"); + } else { + logger.error("Lost connection to FritzBox", e); + } break; } } @@ -473,7 +478,7 @@ private MonitorEvent parseMonitorEvent(String line) { event.timestamp = sections[0]; event.eventType = sections[1]; event.connectionId = sections[2]; - + if (event.eventType.equals("RING")) { event.externalNo = sections[3]; event.internalNo = sections[4]; @@ -525,7 +530,6 @@ private void handleEventType(MonitorEvent event, String bindingType) { .getItemNamesForType(bindingType)) { Class itemType = provider .getItemType(itemName); - org.openhab.core.types.State state = null; if (event.eventType.equals("DISCONNECT")) { state = itemType.isAssignableFrom(SwitchItem.class) ? OnOffType.OFF