From c3a88d0c48e6fc6377d7ada879b1ad69bfdafb58 Mon Sep 17 00:00:00 2001 From: Trustin Lee Date: Wed, 21 Oct 2009 03:58:38 +0000 Subject: [PATCH] * Fixed incorrect SslHandler.context() implementation * Added some FIXMEs --- src/main/java/org/jboss/netty/handler/ssl/SslHandler.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/jboss/netty/handler/ssl/SslHandler.java b/src/main/java/org/jboss/netty/handler/ssl/SslHandler.java index 0d92a7707c..73db7fcbbb 100644 --- a/src/main/java/org/jboss/netty/handler/ssl/SslHandler.java +++ b/src/main/java/org/jboss/netty/handler/ssl/SslHandler.java @@ -306,6 +306,7 @@ public class SslHandler extends FrameDecoder implements ChannelDownstreamHandler * succeeds or fails. */ public ChannelFuture handshake(Channel channel) throws SSLException { + // FIXME do not throw SSLException - return a failed future. ChannelFuture handshakeFuture; synchronized (handshakeLock) { if (handshaking) { @@ -327,13 +328,14 @@ public class SslHandler extends FrameDecoder implements ChannelDownstreamHandler * destroys the underlying {@link SSLEngine}. */ public ChannelFuture close(Channel channel) throws SSLException { + // FIXME do not throw SSLException - return a failed future. ChannelHandlerContext ctx = context(channel); engine.closeOutbound(); return wrapNonAppData(ctx, channel); } private ChannelHandlerContext context(Channel channel) { - return channel.getPipeline().getContext(getClass()); + return channel.getPipeline().getContext(this); } public void handleDownstream(