Index: trunk/src/org/openstreetmap/josm/gui/oauth/OsmOAuthAuthorizationClient.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/oauth/OsmOAuthAuthorizationClient.java	(revision 12203)
+++ trunk/src/org/openstreetmap/josm/gui/oauth/OsmOAuthAuthorizationClient.java	(revision 12204)
@@ -6,5 +6,4 @@
 import java.io.BufferedReader;
 import java.io.IOException;
-import java.lang.reflect.Field;
 import java.net.CookieHandler;
 import java.net.HttpURLConnection;
@@ -89,17 +88,4 @@
     public void cancel() {
         canceled = true;
-        if (provider != null) {
-            try {
-                Field f = provider.getClass().getDeclaredField("connection");
-                Utils.setObjectsAccessible(f);
-                HttpURLConnection con = (HttpURLConnection) f.get(provider);
-                if (con != null) {
-                    con.disconnect();
-                }
-            } catch (NoSuchFieldException | SecurityException | IllegalAccessException e) {
-                Main.error(e);
-                Main.warn(tr("Failed to cancel running OAuth operation"));
-            }
-        }
         synchronized (this) {
             if (connection != null) {
