Changeset 38930


Ignore:
Timestamp:
2024-04-16T16:56:00+12:00 (6 weeks ago)
Author:
anupama
Message:

Ending recursive calls faster if the application has been terminated prematurely.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/applet/GsdlCollageApplet/DownloadUrls.java

    r38908 r38930  
    453453    public void rec_add_images(String new_url, int depth)
    454454    {
     455    // Check if the application's stopping, to end this recursive function as soon as possible
     456    if(stop_running) {
     457        return;
     458    }   
     459   
    455460    if (verbosity_ >= 2) {
    456461        System.err.println("*** Inspecting url: " + new_url);
     
    582587                if (filter_href(url_string,new_url,depth))
    583588                {
    584        
     589                    // If application has stopped, then don't do the
     590                    // recursive call, so we stop faster before exploring yet
     591                    // more links and deciding to stop then
     592                    if(stop_running) {
     593                    return;
     594                    }       
    585595                    rec_add_images(url_string,depth+1);
    586596                   
Note: See TracChangeset for help on using the changeset viewer.