Index: /trunk/src/org/openstreetmap/josm/io/remotecontrol/RequestProcessor.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/remotecontrol/RequestProcessor.java	(revision 19725)
+++ /trunk/src/org/openstreetmap/josm/io/remotecontrol/RequestProcessor.java	(revision 19726)
@@ -197,8 +197,4 @@
     @Override
     public void run() {
-        // The locks ensure that we process the instructions in the order in which they came.
-        // This is mostly important when the caller is attempting to create a new layer and add multiple download
-        // instructions for that layer. See #23821 for additional details.
-        ORDER_LOCK.lock();
         try (request;
              Writer out = new OutputStreamWriter(new BufferedOutputStream(request.getOutputStream()), RESPONSE_CHARSET);
@@ -207,6 +203,4 @@
         } catch (IOException ioe) {
             Logging.debug(Logging.getErrorMessage(ioe));
-        } finally {
-            ORDER_LOCK.unlock();
         }
     }
@@ -251,5 +245,15 @@
             final Map<String, String> headers = parseHeaders(in);
             final String sender = parseSender(headers, request);
-            callHandler(url, command, out, sender);
+            // The lock ensures that we process the instructions in the order in which they came.
+            // This is mostly important when the caller is attempting to create a new layer and add multiple download
+            // instructions for that layer. See #23821 for additional details.
+            // It must only be taken once the request has been read. Otherwise a client that opens a connection without
+            // sending anything (e.g. a browser preconnect) blocks every other remote control request until it gives up.
+            ORDER_LOCK.lock();
+            try {
+                callHandler(url, command, out, sender);
+            } finally {
+                ORDER_LOCK.unlock();
+            }
         } catch (ReflectiveOperationException e) {
             Logging.error(e);
