From 45ec73c11594831b4f81eac3687f9760f1835ac1 Mon Sep 17 00:00:00 2001 From: jrandom Date: Fri, 7 May 2004 03:33:23 +0000 Subject: [PATCH] include a unique request id in the client runner thread name minor cleanup --- .../src/net/i2p/i2ptunnel/I2PTunnelClientBase.java | 4 +++- .../src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java | 10 +++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelClientBase.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelClientBase.java index 3a20c5777..1dec0266a 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelClientBase.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelClientBase.java @@ -275,12 +275,14 @@ public abstract class I2PTunnelClientBase extends I2PTunnelTask implements Runna } } + private static volatile long __runnerId = 0; + public class ClientConnectionRunner extends I2PThread { private Socket s; public ClientConnectionRunner(Socket s, String name) { this.s = s; - setName(name); + setName(name + '.' + (++__runnerId)); start(); } diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java index 1ffc89fa3..5d5833f1a 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java @@ -65,7 +65,7 @@ public class I2PTunnelHTTPClient extends I2PTunnelClientBase implements Runnable "That Desitination was not found. Perhaps you pasted in the wrong "+ "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 "+ - "temporarily offline. "+ + "temporarily offline. You may want to retry. "+ "Could not find the following Destination:

") .getBytes(); @@ -75,17 +75,13 @@ public class I2PTunnelHTTPClient extends I2PTunnelClientBase implements Runnable "Cache-control: no-cache\r\n\r\n"+ "

I2P ERROR: TIMEOUT

"+ "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 "+ "destination may have issues. Could not get a response from "+ "the following Destination:

") .getBytes(); -// public I2PTunnelHTTPClient(int localPort, Logging l, -// boolean ownDest, String wwwProxy) { -// this(localPort, l, ownDest, wwwProxy, (EventDispatcher)null); -// } - + /** used to assign unique IDs to the threads / clients. no logic or functionality */ private static volatile long __clientId = 0; public I2PTunnelHTTPClient(int localPort, Logging l, boolean ownDest, String wwwProxy, EventDispatcher notifyThis) {