8349702: jdk.internal.net.http.Http2Connection::putStream needs to provide cause while cancelling stream

Reviewed-by: jpai, dfuchs
This commit is contained in:
Volkan Yazici 2025-02-12 01:58:22 +00:00 committed by Jaikiran Pai
parent 8c09d40d6c
commit d558d9d427
2 changed files with 3 additions and 3 deletions

View File

@ -1602,7 +1602,7 @@ class Http2Connection {
stateLock.unlock();
}
if (debug.on()) debug.log("connection closed: closing stream %d", stream);
stream.cancel();
stream.cancel(new IOException("Stream " + streamid + " cancelled", cause.get()));
}
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2022, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -23,7 +23,7 @@
/*
* @test
* @bug 8277969 8299338
* @bug 8277969 8299338 8349702
* @summary Test for edge case where the executor is not accepting
* new tasks while the client is still running
* @library /test/lib /test/jdk/java/net/httpclient/lib