On Tue, 3 Jan 2023 08:29:41 GMT, Matthias Baesken <mbaes...@openjdk.org> wrote:

> Hi Alan, I removed the InterruptedIOException enhancement . Regarding the 
> ConnectionResetException in NioSocketImpl.java, it is not so bad to know what 
> tryRead caused it. So why not add it ?
> 
> Additionally we could also add the errno (EPIPE or ECONNRESET) to the 
> exception message to get a better picture of the error situation (see 
> java.base/unix/native/libnio/ch/SocketDispatcher.c ).

sun.net.ConnectionResetException is used to communicate the error from the 
native code to the socket impl. It's part of an internal contract and never 
ended to be leak out to user code.

There have been discussions every few yers about introducing a specific 
SocketException for the "connection reset" scenario and maybe it is time to 
look at that again.

-------------

PR: https://git.openjdk.org/jdk/pull/11813

Reply via email to