8316031: SSLFlowDelegate should not log from synchronized block

Reviewed-by: djelinski
This commit is contained in:
Daniel Fuchs 2023-09-15 17:21:27 +00:00
parent 8dfde28b28
commit dc5ca1d379
2 changed files with 7 additions and 5 deletions

View File

@ -971,10 +971,12 @@ public class SSLFlowDelegate {
boolean stopped;
private synchronized void normalStop() {
if (stopped)
return;
stopped = true;
private void normalStop() {
synchronized (this) {
if (stopped)
return;
stopped = true;
}
reader.stop();
writer.stop();
// make sure the alpnCF is completed.

View File

@ -54,7 +54,7 @@ import static java.net.http.HttpClient.Version.HTTP_2;
* @test
* @summary Tests HttpClient usage when configured with a local address to bind
* to, when sending requests
* @bug 8209137
* @bug 8209137 8316031
* @library /test/lib /test/jdk/java/net/httpclient/lib
*
* @build jdk.test.lib.net.SimpleSSLContext jdk.test.lib.net.IPSupport