mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[remoteopenhab] Optimize filtering of ALIVE events (#13432)
* [remoteopenhab] Optimize handling of ALIVE events Signed-off-by: Laurent Garnier <lg.hc@free.fr>
This commit is contained in:
parent
6069286ffd
commit
d00ca1caeb
@ -400,17 +400,13 @@ public class RemoteopenhabRestClient {
|
||||
connected = true;
|
||||
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 {
|
||||
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 thingUID;
|
||||
RemoteopenhabEventPayload payload;
|
||||
|
Loading…
Reference in New Issue
Block a user