Merge pull request #2070 from jchobantonov/master

when using findSession check if the session exists in Redis first before creating a new one - a fix for #2019
pull/2075/head
Nikita Koksharov 6 years ago committed by GitHub
commit bfb313306b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -187,6 +187,11 @@ public class RedissonSessionManager extends ManagerBase implements Lifecycle {
} catch (Exception e) {
log.error("Can't read session object by id: " + id, e);
}
if (attrs.isEmpty()) {
log.info("Session " + id + " can't be found");
return null;
}
RedissonSession session = (RedissonSession) createEmptySession();
session.load(attrs);

@ -166,6 +166,11 @@ public class RedissonSessionManager extends ManagerBase {
} catch (Exception e) {
log.error("Can't read session object by id: " + id, e);
}
if (attrs.isEmpty()) {
log.info("Session " + id + " can't be found");
return null;
}
RedissonSession session = (RedissonSession) createEmptySession();
session.load(attrs);

@ -165,7 +165,12 @@ public class RedissonSessionManager extends ManagerBase {
} catch (Exception e) {
log.error("Can't read session object by id: " + id, e);
}
if (attrs.isEmpty()) {
log.info("Session " + id + " can't be found");
return null;
}
RedissonSession session = (RedissonSession) createEmptySession();
session.load(attrs);
session.setId(id);

@ -165,6 +165,11 @@ public class RedissonSessionManager extends ManagerBase {
} catch (Exception e) {
log.error("Can't read session object by id: " + id, e);
}
if (attrs.isEmpty()) {
log.info("Session " + id + " can't be found");
return null;
}
RedissonSession session = (RedissonSession) createEmptySession();
session.load(attrs);

Loading…
Cancel
Save