Changeset 22692

Show
Ignore:
Timestamp:
19.08.2010 20:10:17 (9 years ago)
Author:
ak19
Message:

Clean exit out of client GLI if the user cancelled out of the authentication popup that appears at the start

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/gli/src/org/greenstone/gatherer/remote/RemoteGreenstoneServer.java

    r22691 r22692  
    489489        // Ask for authentication information (if necessary), then perform the action 
    490490        if(isAuthenticationRequired(gliserver_args)) { 
    491         authenticateUser(); 
     491        try { 
     492            authenticateUser(); 
     493        } catch (RemoteGreenstoneServerAction.ActionCancelledException e) { 
     494            // Authentication popup only appears at the start. If the user cancelled 
     495            // out of it, then another remote action always remains on the queue, 
     496            // preventing a clean exit. Need to clear queue before exit. 
     497            synchronized (remote_greenstone_server_action_queue) {           
     498            remote_greenstone_server_action_queue.clear();           
     499            } 
     500            Gatherer.exit(); 
     501        } 
    492502        } 
    493503        String gliserver_url_string = Configuration.gliserver_url.toString();