Fixed a problem where AbstractSocketSslEchoTest doesn't close all channels when a connection attempt fails.

This commit is contained in:
Trustin Lee 2008-11-16 16:25:08 +00:00
parent feac0d6a3d
commit 0e3679e919

View File

@ -148,7 +148,12 @@ public abstract class AbstractSocketSslEchoTest {
int port = ((InetSocketAddress) sc.getLocalAddress()).getPort();
ChannelFuture ccf = cb.connect(new InetSocketAddress(InetAddress.getLocalHost(), port));
assertTrue(ccf.awaitUninterruptibly().isSuccess());
ccf.awaitUninterruptibly();
if (!ccf.isSuccess()) {
logger.error("Connection attempt failed", ccf.getCause());
sc.close().awaitUninterruptibly();
}
assertTrue(ccf.isSuccess());
Channel cc = ccf.getChannel();
ChannelFuture hf = cc.getPipeline().get(SslHandler.class).handshake(cc);