2005-12-27 jrandom

* Add a new Status: line on the router console - "ERR-ClockSkew", in case
      the clock is too skewed to do anything useful (check the year and month,
      not just the hour and minute).
    * Fixed the read/write timeouts in the streaming lib (so that it actually
      honors them now)
    * Minor I2PSnark cleanups (no read timeout, more careful shutdown and
      torrent closing)
    * Handle an oddball tunnel creation failure (thanks Xunk)
This commit is contained in:
jrandom
2005-12-27 13:20:50 +00:00
committed by zzz
parent 9b7e5d1817
commit 1d0d0d9c69
11 changed files with 63 additions and 22 deletions

View File

@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
*
*/
public class RouterVersion {
public final static String ID = "$Revision: 1.317 $ $Date: 2005/12/22 07:49:09 $";
public final static String ID = "$Revision: 1.318 $ $Date: 2005/12/26 23:20:30 $";
public final static String VERSION = "0.6.1.8";
public final static long BUILD = 1;
public final static long BUILD = 2;
public static void main(String args[]) {
System.out.println("I2P Router version: " + VERSION + "-" + BUILD);
System.out.println("Router ID: " + RouterVersion.ID);

View File

@ -252,15 +252,17 @@ public class RequestTunnelJob extends JobImpl {
default:
// ignore
}
// penalize peer based on their bitchiness level
getContext().profileManager().tunnelRejected(_currentPeer.getIdentity().calculateHash(),
getContext().clock().now() - _lastSendTime,
howBad);
if (_currentPeer != null)
// penalize peer based on their bitchiness level
getContext().profileManager().tunnelRejected(_currentPeer.getIdentity().calculateHash(),
getContext().clock().now() - _lastSendTime,
howBad);
}
if (_log.shouldLog(Log.INFO))
_log.info("Tunnel request failed w/ cause=" + howBad + " for peer "
+ _currentPeer.getIdentity().calculateHash().toBase64().substring(0,4));
+ (_currentPeer == null ? "[unknown]" :
_currentPeer.getIdentity().calculateHash().toBase64().substring(0,4)));
tunnelFail();
}