[josm-dev] JOSM Ticket #263, cancelling an upload
Florian Heer
florianheerfheb at yahoo.de
Sun Aug 10 16:15:51 BST 2008
Dirk Stöcker schrieb:
> svn exports this directly with svn diff.
>
great, thanks.
Regards, Florian.
Index: org/openstreetmap/josm/io/OsmConnection.java
===================================================================
--- org/openstreetmap/josm/io/OsmConnection.java (revision 761)
+++ org/openstreetmap/josm/io/OsmConnection.java (working copy)
@@ -127,8 +127,11 @@
Main.pleaseWaitDlg.currentAction.setText(tr("Aborting..."));
cancel = true;
if (activeConnection != null) {
- activeConnection.setConnectTimeout(1);
- activeConnection.setReadTimeout(1);
+ activeConnection.setConnectTimeout(100);
+ activeConnection.setReadTimeout(100);
+ try {
+ Thread.sleep(100);
+ } catch (InterruptedException ex) {}
activeConnection.disconnect();
}
}
Index: org/openstreetmap/josm/io/OsmServerWriter.java
===================================================================
--- org/openstreetmap/josm/io/OsmServerWriter.java (revision 761)
+++ org/openstreetmap/josm/io/OsmServerWriter.java (working copy)
@@ -54,7 +54,8 @@
/**
* Whether the operation should be aborted as soon as possible.
*/
- private boolean cancel = false;
+ // use the inherited variable
+ // private boolean cancel = false;
/**
* Object describing current changeset
More information about the josm-dev
mailing list