src/java.net.http/share/classes/jdk/internal/net/http/Http1Exchange.java
changeset 51364 31d9e82b2e64
parent 50985 cd41f34e548c
child 52554 5f1ca46703f9
child 56868 67c7659ecda5
equal deleted inserted replaced
51363:a6fa2016cff1 51364:31d9e82b2e64
   231         if (debug.on()) debug.log("response created in advance");
   231         if (debug.on()) debug.log("response created in advance");
   232 
   232 
   233         CompletableFuture<Void> connectCF;
   233         CompletableFuture<Void> connectCF;
   234         if (!connection.connected()) {
   234         if (!connection.connected()) {
   235             if (debug.on()) debug.log("initiating connect async");
   235             if (debug.on()) debug.log("initiating connect async");
   236             connectCF = connection.connectAsync();
   236             connectCF = connection.connectAsync(exchange)
       
   237                     .thenCompose(unused -> connection.finishConnect());
   237             Throwable cancelled;
   238             Throwable cancelled;
   238             synchronized (lock) {
   239             synchronized (lock) {
   239                 if ((cancelled = failed) == null) {
   240                 if ((cancelled = failed) == null) {
   240                     operations.add(connectCF);
   241                     operations.add(connectCF);
   241                 }
   242                 }