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; boolean stopped;
private synchronized void normalStop() { private void normalStop() {
if (stopped) synchronized (this) {
return; if (stopped)
stopped = true; return;
stopped = true;
}
reader.stop(); reader.stop();
writer.stop(); writer.stop();
// make sure the alpnCF is completed. // make sure the alpnCF is completed.

View File

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