Ignore:
Timestamp:
2017-08-07T19:09:21+12:00 (7 years ago)
Author:
ak19
Message:

If the proxy settings are wrong or set when not needed, pressing the Server Information button would take forever (freeze GLI GUI), and the wget that java launched through perl would also take forever, blocking. The wget will have to be terminated from Task Manager. To overcome issues of network settings misconfigurations, which Dr Bainbridge said are hard to detect, setting the number of tries on pressing the Server Info button to 2. The number of tries for pressing the Download button were already 2, so this just makes the two wget commands issued more similar (but the wget launched by the Download button now uses the --tries=2 rather than the shorthand -t 2 too, so that the code reads better). Setting the number of wget retries launched by the Server Info Dialog also ensures wget is eventually terminated, as happens when both tries fail. Some more informative messages are now displayed if the server is unavaiable, depending on whether proxying is on or not.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/downloaders/WgetDownload.pm

    r31851 r31856  
    263263    # closing an extra unused handle, a single handle is used instead for both the child's
    264264    # stderr and stdout.
     265    # See http://blog.0x1fff.com/2009/09/howto-execute-system-commands-in-perl.html
     266    # for why this is the right thing to do.
    265267
    266268    # Both open2 and open3 don't return on failure, but raise an exception. The handling
     
    284286        }
    285287        $strReadIn .= $strLine;
    286     } 
     288    }
    287289    else { # wget finished, terminate naturally
    288290        #print STDOUT "\nPerl: open2 command, input stream closed. Wget terminated naturally.\n";
Note: See TracChangeset for help on using the changeset viewer.