SslHandler and "The connection was interrupted by the software of your host machine"?

I am writing an SSL server using netty following the example of a secure chat.

I have automatic tests that

  • open ssl connection
  • from time to time contact <back> back
  • close the channel

(i.e., the client closes the channel when it is completed)

All tests pass, I have another handler in my pipeline that implements 'exceptionCaught'. Sometimes, when a client closes a channel, it throws an ExceptionCaught event on the server using

java.io.IOException: An established connection was aborted by the software in your host machine at sun.nio.ch.SocketDispatcher.read0(Native Method) at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43) at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:218) at sun.nio.ch.IOUtil.read(IOUtil.java:186) at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:359) at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:66) at org.jboss.netty.channel.socket.nio.AbstractNioWorker.processSelectedKeys(AbstractNioWorker.java:364) at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:238) at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:38) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) 

By adding a simple downstream handler both above and below SSLHandler, I determined that SSLHandler seems to generate a subsequent write event after the client closes the channel, but I'm not sure if this is relevant.

Any pointers to what's going on here?

+7
source share

All Articles