include a unique request id in the client runner thread name

minor cleanup
This commit is contained in:
jrandom
2004-05-07 03:33:23 +00:00
committed by zzz
parent 13952ebd8b
commit 45ec73c115
2 changed files with 6 additions and 8 deletions

View File

@@ -275,12 +275,14 @@ public abstract class I2PTunnelClientBase extends I2PTunnelTask implements Runna
} }
} }
private static volatile long __runnerId = 0;
public class ClientConnectionRunner extends I2PThread { public class ClientConnectionRunner extends I2PThread {
private Socket s; private Socket s;
public ClientConnectionRunner(Socket s, String name) { public ClientConnectionRunner(Socket s, String name) {
this.s = s; this.s = s;
setName(name); setName(name + '.' + (++__runnerId));
start(); start();
} }

View File

@@ -65,7 +65,7 @@ public class I2PTunnelHTTPClient extends I2PTunnelClientBase implements Runnable
"That Desitination was not found. Perhaps you pasted in the wrong "+ "That Desitination was not found. Perhaps you pasted in the wrong "+
"BASE64 I2P Destination or the link you are following is bad. "+ "BASE64 I2P Destination or the link you are following is bad. "+
"The host (or the WWW proxy, if you're using one) could also be "+ "The host (or the WWW proxy, if you're using one) could also be "+
"temporarily offline. "+ "temporarily offline. You may want to <b>retry</b>. "+
"Could not find the following Destination:<BR><BR>") "Could not find the following Destination:<BR><BR>")
.getBytes(); .getBytes();
@@ -75,17 +75,13 @@ public class I2PTunnelHTTPClient extends I2PTunnelClientBase implements Runnable
"Cache-control: no-cache\r\n\r\n"+ "Cache-control: no-cache\r\n\r\n"+
"<html><body><H1>I2P ERROR: TIMEOUT</H1>"+ "<html><body><H1>I2P ERROR: TIMEOUT</H1>"+
"That Desitination was reachable, but timed out getting a "+ "That Desitination was reachable, but timed out getting a "+
"response. This may be a temporary error, so you should simply "+ "response. This is likely a temporary error, so you should simply "+
"try to refresh, though if the problem persists, the remote "+ "try to refresh, though if the problem persists, the remote "+
"destination may have issues. Could not get a response from "+ "destination may have issues. Could not get a response from "+
"the following Destination:<BR><BR>") "the following Destination:<BR><BR>")
.getBytes(); .getBytes();
// public I2PTunnelHTTPClient(int localPort, Logging l, /** used to assign unique IDs to the threads / clients. no logic or functionality */
// boolean ownDest, String wwwProxy) {
// this(localPort, l, ownDest, wwwProxy, (EventDispatcher)null);
// }
private static volatile long __clientId = 0; private static volatile long __clientId = 0;
public I2PTunnelHTTPClient(int localPort, Logging l, boolean ownDest, String wwwProxy, EventDispatcher notifyThis) { public I2PTunnelHTTPClient(int localPort, Logging l, boolean ownDest, String wwwProxy, EventDispatcher notifyThis) {