Socket InputStream.available may return a positive value after shutdown
Steve Poole
spoole at linux.vnet.ibm.com
Thu Jul 7 06:09:17 PDT 2011
On 06/07/11 10:05, Jing LV wrote:
> Hello,
>
> Alan (or anyone else), do we have time to discuss these postponed
> defects? Or do you have a outlook for this?
> Thank you.
Hi Jimmy - it may be that everyone is very busy with the Java 7 launch
and, probably, collapsing in a heap after all their great work :-)
Also it might be worth reposting a summary of the defects you want to
discuss just to remind people.
>
> 于 2011-4-27 18:35, Alan Bateman 写道:
>> Jing LV wrote:
>>> Hello,
>>>
>>> Currently I don't see any patch available so I am trying to
>>> create one by myself. I see the problem occurs in
>>> AbstractPlainSocketImpl.available() and it seems it is design to
>>> return 0 when meed a closed socket - this may not be correct
>>> according to the spec, thus change it like this. Would someone
>>> review please?
>> I don't think I understand your proposed change as the connection
>> isn't reset in this case. Maybe you meant to change available to
>> check shut_rd? In any case, I think we need to be cautious as it
>> would change the behavior for the EOF case and so could cause
>> problems for existing applications. There is also a concern for
>> custom SocketImpl implementations that I mentioned previously. I
>> think that whatever approach is decided on will also require adding
>> clarification to the javadoc. So if it's okay with you, I think we
>> should postpone this to 8.
>>
>> -Alan
>
>
More information about the net-dev
mailing list