Skip to content

Commit

Permalink
Fixed - Unable to find session error arise if Tomcat session was dele…
Browse files Browse the repository at this point in the history
…ted or expired #4963
  • Loading branch information
Nikita Koksharov committed Apr 14, 2023
1 parent 81403b1 commit def51ad
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -315,10 +315,9 @@ public void onMessage(CharSequence channel, AttributeMessage msg) {

if (msg instanceof SessionDestroyedMessage) {
Session s = findSession(msg.getSessionId(), false);
if (s == null) {
throw new IllegalStateException("Unable to find session: " + msg.getSessionId());
if (s != null) {
s.expire();
}
s.expire();
RSet<String> set = getNotifiedNodes(msg.getSessionId());
set.add(nodeId);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,10 +315,9 @@ public void onMessage(CharSequence channel, AttributeMessage msg) {

if (msg instanceof SessionDestroyedMessage) {
Session s = findSession(msg.getSessionId(), false);
if (s == null) {
throw new IllegalStateException("Unable to find session: " + msg.getSessionId());
if (s != null) {
s.expire();
}
s.expire();
RSet<String> set = getNotifiedNodes(msg.getSessionId());
set.add(nodeId);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,10 +315,9 @@ public void onMessage(CharSequence channel, AttributeMessage msg) {

if (msg instanceof SessionDestroyedMessage) {
Session s = findSession(msg.getSessionId(), false);
if (s == null) {
throw new IllegalStateException("Unable to find session: " + msg.getSessionId());
if (s != null) {
s.expire();
}
s.expire();
RSet<String> set = getNotifiedNodes(msg.getSessionId());
set.add(nodeId);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,10 +315,9 @@ public void onMessage(CharSequence channel, AttributeMessage msg) {

if (msg instanceof SessionDestroyedMessage) {
Session s = findSession(msg.getSessionId(), false);
if (s == null) {
throw new IllegalStateException("Unable to find session: " + msg.getSessionId());
if (s != null) {
s.expire();
}
s.expire();
RSet<String> set = getNotifiedNodes(msg.getSessionId());
set.add(nodeId);
}
Expand Down

0 comments on commit def51ad

Please sign in to comment.