Update PersistenceDeviceSessionManager.java

This commit is contained in:
老周 2023-06-30 19:56:17 +08:00 committed by GitHub
parent 44f187d5db
commit f524443ba3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -138,11 +138,14 @@ public class PersistenceDeviceSessionManager extends ClusterDeviceSessionManager
}
Mono<Void> resumeSession(PersistentSessionEntity entity) {
return entity
return entity
.toSession(registry.get())
.doOnNext(session -> {
log.debug("resume session[{}]", session.getDeviceId());
localSessions.putIfAbsent(session.getDeviceId(), Mono.just(session));
localSessions.putIfAbsent(session.getDeviceId(),
new DeviceSessionRef(session.getDeviceId(),
this,
session));
})
.onErrorResume((err) -> {
log.debug("resume session[{}] error", entity.getDeviceId(), err);