Skip to content

Commit d558d9d

Browse files
vyjaikiran
authored andcommitted
8349702: jdk.internal.net.http.Http2Connection::putStream needs to provide cause while cancelling stream
Reviewed-by: jpai, dfuchs
1 parent 8c09d40 commit d558d9d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/java.net.http/share/classes/jdk/internal/net/http/Http2Connection.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1602,7 +1602,7 @@ <T> void putStream(Stream<T> stream, int streamid) {
16021602
stateLock.unlock();
16031603
}
16041604
if (debug.on()) debug.log("connection closed: closing stream %d", stream);
1605-
stream.cancel();
1605+
stream.cancel(new IOException("Stream " + streamid + " cancelled", cause.get()));
16061606
}
16071607

16081608
/**

test/jdk/java/net/httpclient/AsyncExecutorShutdown.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2022, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
2323

2424
/*
2525
* @test
26-
* @bug 8277969 8299338
26+
* @bug 8277969 8299338 8349702
2727
* @summary Test for edge case where the executor is not accepting
2828
* new tasks while the client is still running
2929
* @library /test/lib /test/jdk/java/net/httpclient/lib

0 commit comments

Comments
 (0)