> On 28 Mar 2018, at 19:47, Roger Riggs <roger.ri...@oracle.com> wrote: > > Hi Chris, > > TwoStacksPlainDatagramSocketImpl.java:136 could be explicit about the native > bind0 > changing the state.
Ok. > And I agree with Alan that the calls to updateCleaner (:144) should occur > whether or not > the native bind0 throws an exception. > ... >> >> bind0 can try an exception so shouldn't there be a try-finally around this? >> Also would it be saner to unregister before bind0 and register afresh after >> it is called so that there is no point where a closed socket is registered >> with the cleaner? Right, unconditionally unregistering and re-registering would be easier to follow, and then try-finally would not be required either. I’ll try this, test it, and report back. -Chris.