Skip to content

Commit

Permalink
Merge pull request payara#6749 from flowlogix/fix-dangling-session-th…
Browse files Browse the repository at this point in the history
…read

Properly cleaning up ContainerBackgroundSessionProcessor threads after application is undeployed
  • Loading branch information
breakponchito authored and Pandrex247 committed Jul 5, 2024
1 parent 9d95c69 commit 5fb6c40
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 5fb6c40

Please sign in to comment.