From 9157c880241303062bdb10570c708c66b320a023 Mon Sep 17 00:00:00 2001 From: zhouhao Date: Fri, 19 Apr 2024 11:34:13 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BC=98=E5=8C=96=E5=AD=90?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E6=B3=A8=E9=94=80=E6=B6=88=E6=81=AF=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/jetlinks/community/gateway/DeviceGatewayHelper.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/jetlinks-components/gateway-component/src/main/java/org/jetlinks/community/gateway/DeviceGatewayHelper.java b/jetlinks-components/gateway-component/src/main/java/org/jetlinks/community/gateway/DeviceGatewayHelper.java index 3abdbaf7..d8ec5dce 100755 --- a/jetlinks-components/gateway-component/src/main/java/org/jetlinks/community/gateway/DeviceGatewayHelper.java +++ b/jetlinks-components/gateway-component/src/main/java/org/jetlinks/community/gateway/DeviceGatewayHelper.java @@ -34,13 +34,11 @@ import java.util.function.Supplier; * @since 1.5 */ @AllArgsConstructor +@Getter public class DeviceGatewayHelper { - @Getter private final DeviceRegistry registry; - @Getter private final DeviceSessionManager sessionManager; - @Getter private final DecodedClientMessageHandler messageHandler; public static Consumer applySessionKeepaliveTimeout(DeviceMessage msg, Supplier timeoutSupplier) { @@ -112,7 +110,7 @@ public class DeviceGatewayHelper { return sessionManager .remove(childrenId, removeSessionOnlyLocal(children)) .doOnNext(total -> { - if (total > 0) { + if (total > 0 && children instanceof DeviceOfflineMessage) { children.addHeader(Headers.ignore, true); } })