Skip to content

Commit 9b85a24

Browse files
genusssimonbasle
authored andcommitted
SimpleAsyncTaskScheduler stops accepting new tasks when isShutdown
This changes the criteria for simplified task rejection logging from to be that the executor is in the shutdown phase, not fully terminated. See gh-33334 Closes gh-33336
1 parent 5a99407 commit 9b85a24

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-context/src/main/java/org/springframework/scheduling/concurrent/SimpleAsyncTaskScheduler.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ private Runnable scheduledTask(Runnable task) {
201201
}
202202

203203
private void shutdownAwareErrorHandler(Throwable ex) {
204-
if (this.scheduledExecutor.isTerminated()) {
204+
if (this.scheduledExecutor.isShutdown()) {
205205
LogFactory.getLog(getClass()).debug("Ignoring scheduled task exception after shutdown", ex);
206206
}
207207
else {

0 commit comments

Comments
 (0)