[rfc][icedtea-web] PAV - Add missing timeout check

Jiri Vanek jvanek at redhat.com
Tue Jul 17 01:11:34 PDT 2012


Imho worthy also for 1.3
J.

On 07/16/2012 11:57 PM, Danesh Dadachanji wrote:
>
>
> On 16/07/12 04:22 PM, Deepak Bhole wrote:
>> * Thomas Meyer <thomas at m3y3r.de> [2012-07-16 16:17]:
>>> Resend.
>>>
>>
>> Sorry, missed this. Looks fine to me, OK for head.
>>
>
> Needs a ChangeLog entry though, couldn't see one anywhere. =)
>
> Cheers,
> Danesh
>
>> Thanks!
>> Deepak
>>
>>> # HG changeset patch
>>> # Parent 01544fb823842910b062b5b05b6872812ceecb98
>>>
>>> diff -r 01544fb82384 plugin/icedteanp/java/sun/applet/PluginAppletViewer.java
>>> --- a/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java    Wed Jul 11 16:18:58 2012 +0200
>>> +++ b/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java    Mon Jul 16 22:08:38 2012 +0200
>>> @@ -745,9 +745,19 @@
>>>               long maxTimeToSleep = APPLET_TIMEOUT;
>>>               panelLock.lock();
>>>               try {
>>> -                while (panel == null || !panel.isAlive())
>>> +                while (panel == null || !panel.isAlive()) {
>>>                       maxTimeToSleep -= waitTillTimeout(panelLock, panelLive,
>>>                                                         maxTimeToSleep);
>>> +
>>> +                    /* we already waited till timeout, give up here directly,
>>> +                     *  instead of waiting 180s again in below waitForAppletInit()
>>> +                     */
>>> +                    if(maxTimeToSleep < 0) {
>>> +                        panelLock.unlock();
>>> +                        streamhandler.write("instance " + identifier + " reference " + -1 + "
>>> fatalError: " + "Initialization timed out");
>>> +                        return;
>>> +                    }
>>> +                }
>>>               }
>>>               finally {
>>>                   panelLock.unlock();
>>>
>>
>





More information about the distro-pkg-dev mailing list