Skip to content

Commit 2496fe6

Browse files
authored
relax http stream.next closure assertion (#120486)
1 parent 3db24b6 commit 2496fe6

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

modules/transport-netty4/src/main/java/org/elasticsearch/http/netty4/Netty4HttpRequestBodyStream.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,15 @@ public void addTracingHandler(ChunkHandler chunkHandler) {
7575

7676
@Override
7777
public void next() {
78-
assert closing == false : "cannot request next chunk on closing stream";
7978
assert handler != null : "handler must be set before requesting next chunk";
8079
requestContext = threadContext.newStoredContext();
8180
channel.eventLoop().submit(() -> {
8281
activityTracker.startActivity();
8382
requested = true;
8483
try {
84+
if (closing) {
85+
return;
86+
}
8587
if (buf == null) {
8688
channel.read();
8789
} else {

muted-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,3 @@ tests:
456456
- class: org.elasticsearch.backwards.MixedClusterClientYamlTestSuiteIT
457457
method: test {p0=logsdb/10_settings/missing hostname field}
458458
issue: https://github.com/elastic/elasticsearch/issues/120476
459-
- class: org.elasticsearch.http.netty4.Netty4IncrementalRequestHandlingIT
460-
method: testHttpBodyLoggingChannelClose
461-
issue: https://github.com/elastic/elasticsearch/issues/120481

0 commit comments

Comments
 (0)