[remoteopenhab] Optimize filtering of ALIVE events (#13432)
* [remoteopenhab] Optimize handling of ALIVE events Signed-off-by: Laurent Garnier <lg.hc@free.fr>pull/13468/head
parent
6069286ffd
commit
d00ca1caeb
|
@ -400,17 +400,13 @@ public class RemoteopenhabRestClient {
|
||||||
connected = true;
|
connected = true;
|
||||||
listeners.forEach(listener -> listener.onConnected());
|
listeners.forEach(listener -> listener.onConnected());
|
||||||
}
|
}
|
||||||
|
if (!"message".equals(name)) {
|
||||||
|
// Ignore silently all events which are not "message" events. This includes the "alive" events.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
RemoteopenhabEvent event = jsonParser.fromJson(data, RemoteopenhabEvent.class);
|
RemoteopenhabEvent event = jsonParser.fromJson(data, RemoteopenhabEvent.class);
|
||||||
if ("ALIVE".equals(event.type)) {
|
|
||||||
// ignore ALIVE message
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!"message".equals(name)) {
|
|
||||||
logger.debug("Received unhandled event with name '{}' and data '{}'", name, data);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
String itemName;
|
String itemName;
|
||||||
String thingUID;
|
String thingUID;
|
||||||
RemoteopenhabEventPayload payload;
|
RemoteopenhabEventPayload payload;
|
||||||
|
|
Loading…
Reference in New Issue