Skip to content

Commit

Permalink
Issue jetty#7650 - Fix race condition when stopping QueuedThreadPool
Browse files Browse the repository at this point in the history
Signed-off-by: Dominik Zöchbauer <dominik@zoechbauer.info>
  • Loading branch information
dzoech committed Feb 7, 2023
1 parent 0a4a077 commit 12d6a52
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -288,9 +288,13 @@ protected void doStop() throws Exception
}

// Close any un-executed jobs
while (!_jobs.isEmpty())
while (true)
{
Runnable job = _jobs.poll();
if (job == null)
{
break;
}
if (job instanceof Closeable)
{
try
Expand Down

0 comments on commit 12d6a52

Please sign in to comment.