Skip to content

Commit 9b54bfe

Browse files
authored
Call completeStream only once on failure.
Fix #13470 by calling completeStream only once even when there is a failure in the channel callback. * Call completeStream only once on failure. * refactor success and failure into single method. * Improved EventSourceServlet
1 parent d269507 commit 9b54bfe

File tree

5 files changed

+257
-191
lines changed

5 files changed

+257
-191
lines changed

jetty-core/jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientFailureTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ public void testPendingRequestContentThenTotalTimeout() throws Exception
175175
completed.incrementAndGet();
176176
assertThat(result.getRequestFailure(), notNullValue());
177177
assertThat(result.getResponseFailure(), nullValue());
178-
assertThat(result.getResponse().getStatus(), is(HttpStatus.OK_200));
178+
assertThat(result.getResponse().getStatus(), is(HttpStatus.INTERNAL_SERVER_ERROR_500));
179179
resultLatch.countDown();
180180
});
181181

0 commit comments

Comments
 (0)