ServerSocket.isBound() continue to return true after close() is called.
Chris Hegarty
chris.hegarty at oracle.com
Fri Apr 12 08:44:51 UTC 2019
The following JIRA issue has been filed to track this:
https://bugs.openjdk.java.net/browse/JDK-8222363
-Chris.
P.S. my bad! I missed this case when working on 6505016 ( in 2007! )
> On 11 Apr 2019, at 16:27, Norman Maurer <norman.maurer at googlemail.com> wrote:
>
> Ok thanks… update to the java docs sounds good to me. I was just suprised by the behaviour :)
>
>> On 11. Apr 2019, at 17:12, Michael McMahon <michael.x.mcmahon at oracle.com <mailto:michael.x.mcmahon at oracle.com>> wrote:
>>
>> Norman
>>
>> The specification on what happens to all socket types was updated many years ago
>> in bug id 6505016, but it looks like ServerSocket::isBound was missed from that effort.
>> I think we should probably update the spec to reflect current behavior and be consistent
>> with the change above. There will be some small spec updates to ServerSocket coming
>> which originated from the SocketImpl replacement work that Alan mentioned recently
>> and I think we can include this small change probably with one of those.
>>
>> Michael.
>>
>> On 11/04/2019, 13:40, Norman Maurer wrote:
>>>
>>> Hi there,
>>>
>>> While working on netty I just noticed that a ServerSocket will keep return true when isBound() is called even after it was closed. Is this by design? I was bit surprised by this honestly as after the socket is closed there is no way it will accept any more connections.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/net-dev/attachments/20190412/b6080eb9/attachment-0001.html>
More information about the net-dev
mailing list