I made a fix for the SSLHandler issue which worked for me (it will now
reconnect correctly):

(1) In NettyProducer.java - moved initialization of TCP clientPipeline from
setupTCPCommunication to openConnection. clientPipeline is now retrieved
from the factory every time a connection is made:

    private void openConnection() throws Exception {
        ChannelFuture channelFuture;

        if (clientPipelineFactory == null) {
            clientPipelineFactory = new ClientPipelineFactory(this);
        }
        clientPipeline = clientPipelineFactory.getPipeline();
        clientBootstrap.setPipeline(clientPipeline);

(2) In ClientPipelineFactory, every time the ChannelPipeline is retrieved
SSL is reinitialized:

    public ChannelPipeline getPipeline() throws Exception {
        if (channelPipeline != null) {
                // reinitialize ssl
                if (channelPipeline.remove("ssl") != null)
                {
                        
channelPipeline.addFirst("ssl",configureClientSSLOnDemand());
                }
            return channelPipeline;
        }

If similar changes could be made in SVN, it would be much appreciated.

thanks in advance,
Gareth Collins
-- 
View this message in context: 
http://old.nabble.com/Recovery-From-Netty-Connection-Drop-tp28467631p28519411.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to