Index: trunk/src/org/openstreetmap/josm/io/OsmConnection.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmConnection.java	(revision 762)
+++ trunk/src/org/openstreetmap/josm/io/OsmConnection.java	(revision 763)
@@ -128,6 +128,9 @@
 		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();
 		}
@@ -135,8 +138,8 @@
 
 	protected void addAuth(HttpURLConnection con) throws CharacterCodingException {
-            CharsetEncoder encoder = Charset.forName("UTF-8").newEncoder();
-            String auth = Main.pref.get("osm-server.username") + ":" + Main.pref.get("osm-server.password");
-            ByteBuffer bytes = encoder.encode(CharBuffer.wrap(auth));
-            con.addRequestProperty("Authorization", "Basic "+Base64.encode(bytes));
-    }
+		CharsetEncoder encoder = Charset.forName("UTF-8").newEncoder();
+		String auth = Main.pref.get("osm-server.username") + ":" + Main.pref.get("osm-server.password");
+		ByteBuffer bytes = encoder.encode(CharBuffer.wrap(auth));
+		con.addRequestProperty("Authorization", "Basic "+Base64.encode(bytes));
+	}
 }
Index: trunk/src/org/openstreetmap/josm/io/OsmServerWriter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmServerWriter.java	(revision 762)
+++ trunk/src/org/openstreetmap/josm/io/OsmServerWriter.java	(revision 763)
@@ -55,6 +55,7 @@
 	 * 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
