[cbus] Fix exceptions due to invalid thing status updates (#14385)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
This commit is contained in:
parent
1bc00a0dd8
commit
b9a7e1f346
|
@ -76,7 +76,7 @@ public class CBusCGateHandler extends BaseBridgeHandler {
|
||||||
try {
|
try {
|
||||||
this.ipAddress = InetAddress.getByName(configuration.ipAddress);
|
this.ipAddress = InetAddress.getByName(configuration.ipAddress);
|
||||||
} catch (UnknownHostException e1) {
|
} catch (UnknownHostException e1) {
|
||||||
updateStatus(ThingStatus.UNINITIALIZED, ThingStatusDetail.HANDLER_INITIALIZING_ERROR,
|
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.OFFLINE.COMMUNICATION_ERROR,
|
||||||
"IP Address not resolvable");
|
"IP Address not resolvable");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -171,7 +171,7 @@ public class CBusNetworkHandler extends BaseBridgeHandler {
|
||||||
}
|
}
|
||||||
} catch (CGateException e) {
|
} catch (CGateException e) {
|
||||||
logger.warn("Cannot load C-Bus network {}", networkID, e);
|
logger.warn("Cannot load C-Bus network {}", networkID, e);
|
||||||
updateStatus(ThingStatus.UNINITIALIZED, ThingStatusDetail.COMMUNICATION_ERROR);
|
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.OFFLINE.COMMUNICATION_ERROR);
|
||||||
}
|
}
|
||||||
updateStatus();
|
updateStatus();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue