I'm creating a connection this way, but await doesn't return.
ConnectFuture future = nioDatagramConnector.connect(socketAddress,
localAddress);
future.await();
I looked at the code in DefaultIoFuture. I do not believe there is a race,
but what could keep this thread from seeing the future as 'ready'?
This thread gets caught when my load test is running with max of 250 socket
connections, sending and receiving, The application is constrained to use a
port range and this connect is inside a loop attempting some number of local
ports within that range until an available port is obtained.
I'm altering my code as follows, but I'm not certain if this thread would
not still get caught because I'm not certain there is a race.
ConnectFuture future = nioDatagramConnector.connect(socketAddress,
localAddress);
IoSession session = future.getSession();
while(session == null) {
future.awaitUninterruptibly(1);
session = future.getSession();
}
Any comments?
Thanks,
John