add accept timeouts (default is that if the server doesnt .accept() in 5s, refuse the con)

add unique IDs to the various threads for logging / tracing purposes
This commit is contained in:
jrandom
2004-05-04 04:44:05 +00:00
committed by zzz
parent d7467f5dc3
commit 3a4d0549aa
3 changed files with 157 additions and 66 deletions

View File

@@ -268,6 +268,7 @@ class I2PSocketImpl implements I2PSocket {
}
}
private static volatile long __runnerId = 0;
public class I2PSocketRunner extends I2PThread {
public InputStream in;
@@ -276,7 +277,7 @@ class I2PSocketImpl implements I2PSocket {
_log.debug("Runner's input stream is: " + in.hashCode());
this.in = in;
String peer = I2PSocketImpl.this.remote.calculateHash().toBase64();
setName("SocketRunner from " + peer.substring(0, 4));
setName("SocketRunner " + (++__runnerId) + " " + peer.substring(0, 4));
start();
}