Changeset 6643 in josm for trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpServer.java
- Timestamp:
- 2014-01-06T16:39:45+01:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpServer.java
r6248 r6643 40 40 Integer.toString(port), ex.getLocalizedMessage()); 41 41 } catch (IOException ioe) { 42 ioe.printStackTrace();42 Main.error(ioe); 43 43 } 44 44 } … … 54 54 instance = null; 55 55 } catch (IOException ioe) { 56 ioe.printStackTrace();56 Main.error(ioe); 57 57 } 58 58 } … … 64 64 * @throws IOException when connection errors 65 65 */ 66 public RemoteControlHttpServer(int port) 67 throws IOException 68 { 66 public RemoteControlHttpServer(int port) throws IOException { 69 67 super("RemoteControl HTTP Server"); 70 68 this.setDaemon(true); … … 81 79 */ 82 80 @Override 83 public void run() 84 { 81 public void run() { 85 82 Main.info(marktr("RemoteControl::Accepting connections on port {0}"), 86 83 Integer.toString(server.getLocalPort())); 87 while (true) 88 { 89 try 90 { 84 while (true) { 85 try { 91 86 Socket request = server.accept(); 92 87 RequestProcessor.processRequest(request); 93 } 94 catch( SocketException se) 95 { 88 } catch( SocketException se) { 96 89 if( !server.isClosed() ) 97 se.printStackTrace(); 98 } 99 catch (IOException ioe) 100 { 101 ioe.printStackTrace(); 90 Main.error(se); 91 } catch (IOException ioe) { 92 Main.error(ioe); 102 93 } 103 94 } … … 109 100 * @throws IOException 110 101 */ 111 public void stopServer() throws IOException 112 { 102 public void stopServer() throws IOException { 113 103 server.close(); 114 104 Main.info(marktr("RemoteControl::Server stopped."));
Note:
See TracChangeset
for help on using the changeset viewer.
