Skip to content

Commit

Permalink
Merge pull request #6749 from flowlogix/fix-dangling-session-thread
Browse files Browse the repository at this point in the history
Properly cleaning up ContainerBackgroundSessionProcessor threads after application is undeployed
  • Loading branch information
breakponchito authored Jun 12, 2024
2 parents 54c4687 + 137ac9b commit b54bf99
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1750,7 +1750,7 @@ protected void threadStart() {
* to update lastaccesstime and accessedTime.
*/
protected void threadSessionStart() {
if (sessionThread != null)
if (sessionThread != null || manager == null)
return;
threadSessionDone = false;
String threadName = "ContainerBackgroundSessionProcessor[" + toString() + "]";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5946,6 +5946,8 @@ public synchronized void stop(boolean isShutdown)

// Stop ContainerBackgroundProcessor thread
super.threadStop();
// Stop ContainerBackgroundSessionProcessor thread
super.threadSessionStop();

if ((manager != null) && (manager instanceof Lifecycle)) {
if(manager instanceof StandardManager) {
Expand Down

0 comments on commit b54bf99

Please sign in to comment.