Changeset 22692


Ignore:
Timestamp:
2010-08-19T20:10:17+12:00 (14 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

File:
1 edited

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();
Note: See TracChangeset for help on using the changeset viewer.