Ensure connection process has fully completed before ending wait loop.

This commit is contained in:
Steven Smith 2015-08-20 16:59:59 -07:00
parent c68659008b
commit 4c06294c88

View file

@ -96,15 +96,17 @@ public class TcpClientSession extends TcpSession {
future.addListener(new ChannelFutureListener() {
@Override
public void operationComplete(ChannelFuture future) throws Exception {
complete.set(true);
if(!future.isSuccess() && future.cause() != null) {
exceptionCaught(null, future.cause());
}
}
});
} catch(Throwable t) {
}).await();
complete.set(true);
} catch(Throwable t) {
exceptionCaught(null, t);
complete.set(true);
}
}
}).start();