pending read/failed callback/IOException

Leon Finker leonfin at optonline.net
Wed Apr 22 13:16:04 PDT 2009


I'm just starting with nio.2. 

I noticed that when closing the channel, unless
AsynchronousSocketChannel.shutdownOutput is called, one would get the
following exception object in the failed() callback with pending read():

java.io.IOException: The specified network name is no longer available.

	at sun.nio.ch.Iocp.translateErrorToIOException(Unknown Source)
	at sun.nio.ch.Iocp.access$700(Unknown Source)
	at sun.nio.ch.Iocp$EventHandlerTask.run(Unknown Source)
	at sun.nio.ch.AsynchronousChannelGroupImpl$1.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
Source)
	at java.lang.Thread.run(Unknown Source)

Calling just .close or .shutdownInput followed by .close still produces the
exception. Calling AsynchronousSocketChannel.shutdownOutput followed by
close, will not produce the exception. I'm on build b55. Doesn't seem
correct behavior to me. Thanks!





More information about the nio-dev mailing list