This commit is contained in:
@@ -317,12 +317,16 @@ public final class Transport {
|
|||||||
channel.connect(node.address, node, new CompletionHandler<Void, TransportNode>() {
|
channel.connect(node.address, node, new CompletionHandler<Void, TransportNode>() {
|
||||||
@Override
|
@Override
|
||||||
public void completed(Void result, TransportNode attachment) {
|
public void completed(Void result, TransportNode attachment) {
|
||||||
attachment.disabletime = 0;
|
try {
|
||||||
AsyncConnection asyncConn = AsyncConnection.create(channel, attachment.address, factory.readTimeoutSeconds, factory.writeTimeoutSeconds);
|
attachment.disabletime = 0;
|
||||||
if (future.isDone()) {
|
AsyncConnection asyncConn = AsyncConnection.create(channel, attachment.address, factory.readTimeoutSeconds, factory.writeTimeoutSeconds);
|
||||||
if (!attachment.conns.offer(asyncConn)) asyncConn.dispose();
|
if (future.isDone()) {
|
||||||
} else {
|
if (!attachment.conns.offer(asyncConn)) asyncConn.dispose();
|
||||||
future.complete(asyncConn);
|
} else {
|
||||||
|
future.complete(asyncConn);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
failed(e, attachment);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user