diff --git a/spring-web/src/main/java/org/springframework/web/context/request/async/DeferredResult.java b/spring-web/src/main/java/org/springframework/web/context/request/async/DeferredResult.java index 5d23f281be..71b100304a 100644 --- a/spring-web/src/main/java/org/springframework/web/context/request/async/DeferredResult.java +++ b/spring-web/src/main/java/org/springframework/web/context/request/async/DeferredResult.java @@ -292,14 +292,12 @@ public class DeferredResult { } @Override public boolean handleError(NativeWebRequest request, DeferredResult deferredResult, Throwable t) { - boolean continueProcessing = true; try { if (errorCallback != null) { errorCallback.accept(t); } } finally { - continueProcessing = false; try { setResultInternal(t); } @@ -307,7 +305,7 @@ public class DeferredResult { logger.debug("Failed to handle error result", ex); } } - return continueProcessing; + return false; } @Override public void afterCompletion(NativeWebRequest request, DeferredResult deferredResult) {