// Need to be sure that the second connect is sent otherwise
// the abort and rehandshake may happen before the second
// connect and the test will fail.
Thread.sleep(1000);
client.abort();
Assert.assertFalse(client.isConnected());
// Restart
final CountDownLatch connectLatch = new CountDownLatch(1);
client.getChannel(Channel.META_CONNECT).addListener(new ClientSessionChannel.MessageListener()