Ignore:
Timestamp:
2009-10-25T23:09:53+01:00 (15 years ago)
Author:
Gubaer
Message:

Added canceling of DownloadOsmTaskLists
Removed error remembering in the progress dialog

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/OsmConnection.java

    r2124 r2322  
    9797    public void cancel() {
    9898        cancel = true;
    99         if (activeConnection != null) {
    100             activeConnection.setConnectTimeout(100);
    101             activeConnection.setReadTimeout(100);
    102             try {
    103                 Thread.sleep(100);
    104             } catch (InterruptedException ex) {}
    105             activeConnection.disconnect();
     99        synchronized (this) {
     100            if (activeConnection != null) {
     101                activeConnection.setConnectTimeout(100);
     102                activeConnection.setReadTimeout(100);
     103            }
     104        }
     105        try {
     106            Thread.sleep(100);
     107        } catch (InterruptedException ex) {
     108        }
     109
     110        synchronized (this) {
     111            if (activeConnection != null) {
     112                activeConnection.disconnect();
     113            }
    106114        }
    107115    }
Note: See TracChangeset for help on using the changeset viewer.