ソースを参照

优化设备会话

zhouhao 3 年 前
コミット
bc5f21fe20

+ 4 - 3
jetlinks-components/configure-component/src/main/java/org/jetlinks/community/configure/device/PersistenceDeviceSessionManager.java

@@ -133,9 +133,10 @@ public class PersistenceDeviceSessionManager extends ClusterDeviceSessionManager
             .toSession(registry.get())
             .doOnNext(session -> {
                 log.debug("resume session[{}]", session.getDeviceId());
-                localSessions.putIfAbsent(session.getDeviceId(), new DeviceSessionRef(session.getDeviceId(),
-                                                                                      this,
-                                                                                      Mono.just(session)));
+                localSessions.putIfAbsent(session.getDeviceId(), new DeviceSessionRef(
+                    session.getDeviceId(),
+                    this,
+                    session));
             })
             .onErrorResume((err) -> {
                 log.debug("resume session[{}] error", entity.getDeviceId(), err);