Le 7/2/13 2:00 PM, BlueRhino a écrit :
> Thanks for your replay.I have debugged it.I found that after I sent a
> message,the MINA called the “destory” method to close the session.So when I
> use the session again ,MINA threw the
> "writetoclosedsessionexception"..............................why did MINA
> destory the session.......?
My bet is that you had sent some wrong message, and the remote peer has
closed the connection as a result.

Keep in mind that the connection can be closed by the two sides, and
that you shoudl expect one side to close the connection if the protocol
is not correct.

Check the way you encode the messages, and if you ave no control on the
other peer, then wireshark can help you to know what's going on.

-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com 

Reply via email to