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;
AsyncConnection asyncConn = AsyncConnection.create(channel, attachment.address, factory.readTimeoutSecond, factory.writeTimeoutSecond);
if (future.isDone()) {
if (!attachment.conns.offer(asyncConn)) {
try {
channel.close();
} catch (Exception e) {
}
}
if (!attachment.conns.offer(asyncConn)) asyncConn.dispose();
} else {
future.complete(asyncConn);
}