RFR [11] 8200304: TwoStacksPlainDatagramSocketImpl and socket cleaner

Chris Hegarty chris.hegarty at oracle.com
Thu Mar 29 14:05:41 UTC 2018


> On 29 Mar 2018, at 11:47, Daniel Fuchs <daniel.fuchs at oracle.com> wrote:
> ...
> I wonder if the class could be marked final?
> All these bind0 method are protected, which
> raises the question of what would happen if they are
> overridden in a subclass.

I will make it final.

> On 29 Mar 2018, at 11:43, Alan Bateman <Alan.Bateman at oracle.com> wrote:
> ...
> This is much simpler but are there any cases where bind0 will throw an exception with open sockets? It looks like the !ipv6_supported case might do that when the native bind fails (the ipv6_supported case seems to clean up).

Good catch. The !ipv6_supported case has been updated to close the
socket and set the fd to null. Given that the cleaner is unregistered, and
the fd is null ( close will effectively be a no-op ), it should be fine.

http://cr.openjdk.java.net/~chegar/8200304/02/

-Chris.



More information about the net-dev mailing list