Behaviour of SocketChannelImpl.close() in Java11 (ea+12)
Alan Bateman
Alan.Bateman at oracle.com
Fri May 18 07:10:29 UTC 2018
On 13/05/2018 08:40, Norman Maurer wrote:
> :
>> There was no intention to break the SO_LINGER = 0 case when this code was refactored a few months ago. We can get that working again, at least for cases where the closed channels are promptly flushed from the Selectors that they are registered with. I have changes that I will bring here for review soon.
> Sounds good I will happily review the changes and try out with Netty unit tests.
>
>
That change made it into jdk-11-ea+14 so it would good if you could try
it out [1]. So as discussed, if the SocketChannel has SO_LINGER enabled
to a value of 0 and you close it while registered with one or more
Selectors then the peer should see a "connection reset" once the channel
has been flushed from all Selectors.
-Alan.
[1] http://jdk.java.net/11/
More information about the nio-dev
mailing list