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

Danesh Dadachanji ddadacha at redhat.com
Mon Jul 16 14:57:48 PDT 2012



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