Skip to content

Commit 3e47fcc

Browse files
poutsmarstoyanchev
authored andcommitted
Propagate IOExceptions in Servlet bridge
1 parent 4390cd0 commit 3e47fcc

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

spring-web/src/main/java/org/springframework/http/server/reactive/ServletServerHttpResponse.java

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -197,13 +197,9 @@ protected void flush() throws IOException {
197197
if (logger.isTraceEnabled()) {
198198
logger.trace("flush");
199199
}
200-
try {
201-
this.outputStream.flush();
202-
this.flushOnNext = false;
203-
return;
204-
}
205-
catch (IOException ignored) {
206-
}
200+
this.outputStream.flush();
201+
this.flushOnNext = false;
202+
return;
207203
}
208204
this.flushOnNext = true;
209205

@@ -234,10 +230,7 @@ public void onWritePossible() throws IOException {
234230

235231
@Override
236232
public void onError(Throwable ex) {
237-
// Error on writing to the HTTP stream, so any further writes will probably
238-
// fail. Let's log instead of calling {@link #writeError}.
239-
ResponseBodyProcessor.this.logger
240-
.error("ResponseBodyWriteListener error", ex);
233+
ResponseBodyProcessor.this.onError(ex);
241234
}
242235
}
243236
}

0 commit comments

Comments
 (0)