Le 7/2/13 5:26 AM, BlueRhino a écrit :
> Hi,
>    Now,I am learning MINA.I got a problem.At first I got a “IoSession”  by
> “ConnectFuture.getSession()”. Then I used the method "IoSession.write(Object
> message)"  to send a message . After the message was sent,I used 
> the "IoSession.write(Object message)" again.But the MINA threw a
> “writetoclosedsessionexception”.Why?I did not close the session.And the
> service also did not close it.Did the MINA close the session automatically?
The only reasons a session could automatically closed is either the
remote peer closed the connection, or you've got an exception while
trying to write to the peer.

I suggest you handle the exceptionCaught() message to see what's going
on. Also handle the sessionClose() message.


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

Reply via email to