This commit is contained in:
@@ -107,9 +107,11 @@ public final class Transport {
|
|||||||
p = i;
|
p = i;
|
||||||
addr = remoteAddres[i];
|
addr = remoteAddres[i];
|
||||||
BlockingQueue<AsyncConnection> queue = connPool.get(addr);
|
BlockingQueue<AsyncConnection> queue = connPool.get(addr);
|
||||||
if (queue != null && queue.isEmpty()) {
|
if (queue != null && !queue.isEmpty()) {
|
||||||
AsyncConnection conn = queue.poll();
|
AsyncConnection conn;
|
||||||
if (conn.isOpen()) return conn;
|
while ((conn = queue.poll()) != null) {
|
||||||
|
if (conn.isOpen()) return conn;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (channel == null) channel = AsynchronousSocketChannel.open(group);
|
if (channel == null) channel = AsynchronousSocketChannel.open(group);
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user