Browse Source

Restore correct order of terminated flag check

pull/1379/head
Dávid Karnok 9 years ago committed by Rossen Stoyanchev
parent
commit
68cc57549a
  1. 7
      spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ReactiveTypeHandler.java

7
spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ReactiveTypeHandler.java

@ -274,7 +274,10 @@ class ReactiveTypeHandler { @@ -274,7 +274,10 @@ class ReactiveTypeHandler {
this.elementRef.lazySet(null);
return;
}
// Check terminal signal before processing element..
boolean isTerminated = this.terminated;
Object element = this.elementRef.get();
if (element != null) {
this.elementRef.lazySet(null);
@ -291,7 +294,7 @@ class ReactiveTypeHandler { @@ -291,7 +294,7 @@ class ReactiveTypeHandler {
}
}
if (this.terminated) {
if (isTerminated) {
this.done = true;
Throwable ex = this.error;
this.error = null;

Loading…
Cancel
Save