[jboss-cvs] JBoss Messaging SVN: r4815 - trunk/src/main/org/jboss/messaging/core/remoting/impl/netty.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Aug 18 05:00:54 EDT 2008
Author: trustin
Date: 2008-08-18 05:00:54 -0400 (Mon, 18 Aug 2008)
New Revision: 4815
Modified:
trunk/src/main/org/jboss/messaging/core/remoting/impl/netty/NettyConnector.java
Log:
Fixed NPE when Netty SslHandler is used
Modified: trunk/src/main/org/jboss/messaging/core/remoting/impl/netty/NettyConnector.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/remoting/impl/netty/NettyConnector.java 2008-08-18 08:59:07 UTC (rev 4814)
+++ trunk/src/main/org/jboss/messaging/core/remoting/impl/netty/NettyConnector.java 2008-08-18 09:00:54 UTC (rev 4815)
@@ -48,6 +48,7 @@
import org.jboss.netty.channel.MessageEvent;
import org.jboss.netty.channel.SimpleChannelHandler;
import org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory;
+import org.jboss.netty.handler.ssl.SslHandler;
/**
*
@@ -212,6 +213,15 @@
}
@Override
+ public void channelConnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception
+ {
+ SslHandler sslHandler = ctx.getPipeline().get(SslHandler.class);
+ if (sslHandler != null) {
+ sslHandler.handshake(e.getChannel());
+ }
+ }
+
+ @Override
public void channelDisconnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception
{
listener.connectionDestroyed(e.getChannel().getId());
More information about the jboss-cvs-commits
mailing list