This commit is contained in:
Redkale
2018-03-29 11:18:22 +08:00
parent e250a593a7
commit 097ae701c1

View File

@@ -268,12 +268,7 @@ public final class Transport {
taddr.enable = true; taddr.enable = true;
AsyncConnection asyncConn = AsyncConnection.create(channel, attachment.address, factory.readTimeoutSecond, factory.writeTimeoutSecond); AsyncConnection asyncConn = AsyncConnection.create(channel, attachment.address, factory.readTimeoutSecond, factory.writeTimeoutSecond);
if (future.isDone()) { if (future.isDone()) {
if (!attachment.conns.offer(asyncConn)) { if (!attachment.conns.offer(asyncConn)) asyncConn.dispose();
try {
channel.close();
} catch (Exception e) {
}
}
} else { } else {
future.complete(asyncConn); future.complete(asyncConn);
} }