On 1/13/07, Niklas Therning <[EMAIL PROTECTED]> wrote:
James Im wrote: > I have implemented a IoHandler and its exceptionCaught method. > > I'm receiving java.io.IOException error such as "Connection reset by > peer" and "Broken pipe" quite often. > > Are yo doing anything with these errors or do you just ignore them? > This particular exception you're getting means that the connection has been terminated unexpectedly. Just do what you would have done if you were using plain old java.net.Socket and it threw the same kind of exception: close the session, log the exception (MINA doesn't do that for you), release resources, etc.
Strictly speaking, releasing resources should be done in sessionClosed() method because exceptionCaught is not always called. You can think of sessionClosed as a 'finally' block of Java. Trustin -- what we call human nature is actually human habit -- http://gleamynode.net/ -- PGP key fingerprints: * E167 E6AF E73A CBCE EE41 4A29 544D DE48 FE95 4E7E * B693 628E 6047 4F8F CFA4 455E 1C62 A7DC 0255 ECA6
