Propagate IOExceptions in Servlet bridge

master
Arjen Poutsma 8 years ago committed by Rossen Stoyanchev
parent 4390cd0c2b
commit 3e47fccf2b
  1. 9
      spring-web/src/main/java/org/springframework/http/server/reactive/ServletServerHttpResponse.java

@ -197,14 +197,10 @@ public class ServletServerHttpResponse extends AbstractServerHttpResponse {
if (logger.isTraceEnabled()) { if (logger.isTraceEnabled()) {
logger.trace("flush"); logger.trace("flush");
} }
try {
this.outputStream.flush(); this.outputStream.flush();
this.flushOnNext = false; this.flushOnNext = false;
return; return;
} }
catch (IOException ignored) {
}
}
this.flushOnNext = true; this.flushOnNext = true;
} }
@ -234,10 +230,7 @@ public class ServletServerHttpResponse extends AbstractServerHttpResponse {
@Override @Override
public void onError(Throwable ex) { public void onError(Throwable ex) {
// Error on writing to the HTTP stream, so any further writes will probably ResponseBodyProcessor.this.onError(ex);
// fail. Let's log instead of calling {@link #writeError}.
ResponseBodyProcessor.this.logger
.error("ResponseBodyWriteListener error", ex);
} }
} }
} }

Loading…
Cancel
Save