[rfc][icedtea-web] Check online detection even if checked before
Jacob Wisor
gitne at gmx.de
Tue Jan 27 15:16:58 UTC 2015
On 01/26/2015 at 12:05 PM, Jiri Vanek wrote:
> On 01/21/2015 10:28 AM, Jiri Vanek wrote:
>> On 01/06/2015 09:19 PM, Jacob Wisor wrote:
>>> On 01/06/2015 at 01:25 PM, Jacob Wisor wrote:
>>>> On 01/05/2015 at 05:19 PM, Jie Kang wrote:
[…]
>>> @Jie Kang:
>>> Thank you for spotting this bug.
>>>
>>
>> Is it really an bug? It actually eliminates the benefits of offline environment.
>>
>>>>> consecutive resources: If for the first resource, we detected offline, the
>>>>> boolean onlineDetected would be set to false. Then for the second resource,
>>>>> the detection check would be skipped, even if that resource was able to be
>>>>> connected to. This would result in the second resource being unable to be
>>>>> downloaded, even though it definitely could and should be. The patch fixes
>>>>> this.
>>
>> Thinking about it - how it is possible that first resource could not be downloaded, but second can
>> be, and how it is possible that first one can be missed, while second one not?
>>
>>
>> Maybe before deciding that environment i onnline/offline - we may try to download two or three
>> resources?
>
> One more thing crossed my mind - if the check is done everytime ressource is download.
>
> Then the output of isOnline() method is actually prety undetermined.
Is it possible for InetAddress.getByName() to be asynchronious? This could explain
isOnline() to return false when called for the first time in some cases. Maybe some
other asynchronious part of the code is causing this effect.
Jacob
More information about the distro-pkg-dev
mailing list