[remoteopenhab] Avoid unexpected log for ALIVE SSE message (#13008)

Related to openhab/openhab-core#2983

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
This commit is contained in:
lolodomo 2022-06-27 18:25:00 +02:00 committed by GitHub
parent 1d766bb824
commit 859a1ebfec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -401,13 +401,16 @@ public class RemoteopenhabRestClient {
listeners.forEach(listener -> listener.onConnected());
}
if (!"message".equals(name)) {
logger.debug("Received unhandled event with name '{}' and data '{}'", name, data);
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;