Introduce IOException subclass for ECONNRESET
Simone Bordet
simone.bordet at gmail.com
Tue Aug 23 08:05:49 UTC 2016
Hi,
On Tue, Aug 23, 2016 at 9:40 AM, Norman Maurer
<norman.maurer at googlemail.com> wrote:
> Hi all,
>
> I first asked this on nio-dev[0] but was asked to move this over to here:
>
> I wonder if it would be possible to add a new IOException sub-class for ECONNRESET. Often you receive these errors if a remote peer closed the connection and you try to read from it while using NIO. This is very often not really something that concerns people and can just be handled the same as a “normal close”. At the moment the only way to detect this is to inspect the IOException message which is really hacky. I wonder if we could not add a special IOException sub-class for this. Something like:
>
> ConnectionResetException extends IOException {
> }
>
> In this case it would a lot easier to handle these cases without parsing the message and depend on some “implementation detail”. Does this sound like a good idea ? If so I would be happy to come up with a patch against openjdk.
>
I wholeheartedly support this.
--
Simone Bordet
http://bordet.blogspot.com
---
Finally, no matter how good the architecture and design are,
to deliver bug-free software with optimal performance and reliability,
the implementation technique must be flawless. Victoria Livschitz
More information about the net-dev
mailing list