优化设备会话

This commit is contained in:
zhouhao 2022-07-12 19:40:09 +08:00
parent 9daee536f9
commit bc5f21fe20
1 changed files with 4 additions and 3 deletions

View File

@ -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);