Ensure we aren't waiting for a connection when we've been disconnected by the user.

This commit is contained in:
Steven Smith 2015-08-21 21:16:20 -07:00
parent fa806e58fe
commit b7a1cdf2cc

View file

@ -90,7 +90,7 @@ public class TcpClientSession extends TcpSession {
ChannelFuture future = bootstrap.connect().sync();
if(future.isSuccess()) {
while(!isConnected()) {
while(!isConnected() && !disconnected) {
try {
Thread.sleep(5);
} catch(InterruptedException e) {