[rfc][icedtea-web] Check online detection even if checked before

Jiri Vanek jvanek at redhat.com
Tue Jan 27 15:40:38 UTC 2015


On 01/27/2015 04:37 PM, Jie Kang wrote:
>
>
> ----- Original Message -----
>> On 01/27/2015 04:16 PM, Jacob Wisor wrote:
>>> 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
>>>
>>    I had a different issue in mind:
>>
>>   >
>>   > Resource 1 : Can't download, but it is in cache so we use the cache one.
>>   >
>> isOnline will return false if called now
>>
>>   >
>>   > Resource 2 : Not in cache, but we can download, so we download it into
>>   > cache.
>>   >
>> isOnline will now return true.
>
>
> Hello,
>
> That isn't true with current implementation of ResourceTracker and JNLPRuntime.
>
> See ResourceTracker.initializeResource(), JNLPRuntime.detectOnline() and JNLPRuntime.isOnline().
>
>
Yes I know. But will be valid if we apply your patch. Or not?

J.



More information about the distro-pkg-dev mailing list