equal
deleted
inserted
replaced
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 } |