- Timestamp:
- 2013-04-21T12:58:19+02:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpServer.java
r5893 r5894 21 21 public class RemoteControlHttpServer extends Thread { 22 22 23 /** Default port for the HTTP server */24 public static final int DEFAULT_PORT = 8111;25 26 23 /** The server socket */ 27 24 private ServerSocket server; … … 33 30 */ 34 31 public static void restartRemoteControlHttpServer() { 32 int port = Main.pref.getInteger("remote.control.port", 8111); 35 33 try { 36 34 stopRemoteControlHttpServer(); 37 35 38 instance = new RemoteControlHttpServer( Main.pref.getInteger("remote.control.port", DEFAULT_PORT));36 instance = new RemoteControlHttpServer(port); 39 37 instance.start(); 40 38 } catch (BindException ex) { 41 39 Main.warn(marktr("Warning: Cannot start remotecontrol server on port {0}: {1}"), 42 Integer.toString( DEFAULT_PORT), ex.getLocalizedMessage());40 Integer.toString(port), ex.getLocalizedMessage()); 43 41 } catch (IOException ioe) { 44 42 ioe.printStackTrace();
Note:
See TracChangeset
for help on using the changeset viewer.