Thanks for answering Emmanuel.

I do have an exceptionCaught handler:

    @Override
    public void exceptionCaught(IoSession session, Throwable cause)
    {
        if
(cause.getClass().getName().equalsIgnoreCase("ProtocolDecoderException"))
        {
            session.write("");
            logger.debug("ProtocolDecoderException:", cause);
        }
        logger.error("Error:", cause);
    }

but I don't see anything in the log that might be the result of
exceptionCaught being called. Do I need something in my encoder/decoder as
well to handle exceptions?


On 3 April 2013 15:53, Emmanuel Lécharny <elecha...@gmail.com> wrote:

> Le 4/3/13 4:46 PM, Jennifer Cumming a écrit :
> > I've just started using MINA to implement a TCP based server and it was
> all
> > going well until recently. I've started seeing an issue now where the
> > session.write() in the second call to messageReceived in my handler
> causes
> > the connection to close.
>
> You most certainly get an exception somwhere.
>
> Try to handle the exceptionCaught event in your handler, to see what's
> going on (If you don't, the exception will be silengthly swallowed, and
> the session will be closed).
>
>
> --
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com
>
>

Reply via email to