2006-01-25 jrandom
* Run the peer profile coalescing/reorganization outside the job queue (on one of the timers), to cut down on some job queue congestion. Also, trim old profiles while running, not just when starting up. * Slightly more sane intra-floodfill-node netDb activity (only flood new entries) * Workaround in the I2PTunnelHTTPServer for some bad requests (though the source of the bug is not yet addressed) * Better I2PSnark reconnection handling * Further cleanup in the new tunnel build process * Make sure we expire old participants properly * Remove much of the transient overload throttling (it wasn't using a good metric)
This commit is contained in:
@ -113,10 +113,10 @@ public class ConnectionAcceptor implements Runnable
|
||||
// ok, already updated
|
||||
socketChanged = false;
|
||||
}
|
||||
if (serverSocket == null) {
|
||||
Snark.debug("Server socket went away.. boo hiss", Snark.ERROR);
|
||||
stop = true;
|
||||
return;
|
||||
while ( (serverSocket == null) && (!stop)) {
|
||||
serverSocket = I2PSnarkUtil.instance().getServerSocket();
|
||||
if (serverSocket == null)
|
||||
try { Thread.sleep(10*1000); } catch (InterruptedException ie) {}
|
||||
}
|
||||
try
|
||||
{
|
||||
@ -128,9 +128,7 @@ public class ConnectionAcceptor implements Runnable
|
||||
I2PServerSocket ss = I2PSnarkUtil.instance().getServerSocket();
|
||||
if (ss != serverSocket) {
|
||||
serverSocket = ss;
|
||||
} else {
|
||||
Snark.debug("Null socket accepted, but socket wasn't changed?", Snark.ERROR);
|
||||
try { Thread.sleep(10*1000); } catch (InterruptedException ie) {}
|
||||
socketChanged = true;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@ -154,7 +152,8 @@ public class ConnectionAcceptor implements Runnable
|
||||
|
||||
try
|
||||
{
|
||||
serverSocket.close();
|
||||
if (serverSocket != null)
|
||||
serverSocket.close();
|
||||
}
|
||||
catch (I2PException ignored) { }
|
||||
|
||||
|
@ -152,7 +152,11 @@ public class I2PSnarkUtil {
|
||||
}
|
||||
|
||||
public I2PServerSocket getServerSocket() {
|
||||
return _manager.getServerSocket();
|
||||
I2PSocketManager mgr = _manager;
|
||||
if (mgr != null)
|
||||
return mgr.getServerSocket();
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
String getOurIPString() {
|
||||
|
Reference in New Issue
Block a user