Changeset 5894 in josm for trunk/src


Ignore:
Timestamp:
2013-04-21T12:58:19+02:00 (12 years ago)
Author:
stoecker
Message:

remove static variable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpServer.java

    r5893 r5894  
    2121public class RemoteControlHttpServer extends Thread {
    2222
    23     /** Default port for the HTTP server */
    24     public static final int DEFAULT_PORT = 8111;
    25 
    2623    /** The server socket */
    2724    private ServerSocket server;
     
    3330     */
    3431    public static void restartRemoteControlHttpServer() {
     32        int port = Main.pref.getInteger("remote.control.port", 8111);
    3533        try {
    3634            stopRemoteControlHttpServer();
    3735
    38             instance = new RemoteControlHttpServer(Main.pref.getInteger("remote.control.port", DEFAULT_PORT));
     36            instance = new RemoteControlHttpServer(port);
    3937            instance.start();
    4038        } catch (BindException ex) {
    4139            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());
    4341        } catch (IOException ioe) {
    4442            ioe.printStackTrace();
Note: See TracChangeset for help on using the changeset viewer.