Problem with half-closure related to connection-reset in Java 11
Alan Bateman
Alan.Bateman at oracle.com
Fri Jun 1 12:13:54 UTC 2018
On 01/06/2018 10:21, Florian Weimer wrote:
> On 05/29/2018 04:26 PM, Norman Maurer wrote:
>> Yes thats what I am saying… I think if a write fails due a
>> connection-reset a read should still be possible until we are told by
>> the OS that we also hit an error here.
>
> Are there implementations where the kernel does *not* zap the read
> buffer when it receives an RST segment? (Except perhaps Solaris, as
> mentioned further down the thread.)
I can't say for sure whether the kernels actually drop the socket buffer
or not. For the scenario, the connection reset is reported when writing
and on both Linux and macOS you can read the previously received bytes
in the socket buffer. Solaris behavior is a bit different due to the way
that it reports network issues. Windows does not allow reading the
bytes, it errors immediately. It's surprising to hear about a test that
depend on such behavior but these are the types of things that come up
when changing things in this area.
-Alan
More information about the net-dev
mailing list