propagate from branch 'i2p.i2p' (head 72c44737466e553fec443a79fffa7636894fe383)

to branch 'i2p.i2p.str4d.cleanup' (head 5a2425d7523b732840e55039f88cea5699f1aa83)
This commit is contained in:
str4d
2013-11-24 01:20:11 +00:00
9 changed files with 40 additions and 12 deletions

View File

@@ -263,6 +263,8 @@ public abstract class I2PTunnelClientBase extends I2PTunnelTask implements Runna
getTunnel().removeSession(sess);
if (_log.shouldLog(Log.WARN))
_log.warn(getTunnel().getClientOptions().getProperty("inbound.nickname") + ": Built a new destination on resume");
// make sure the old one is closed
sockMgr.destroySocketManager();
newManager = true;
} // else the old socket manager will reconnect the old session if necessary
}
@@ -320,6 +322,8 @@ public abstract class I2PTunnelClientBase extends I2PTunnelTask implements Runna
if (_log.shouldLog(Log.INFO))
_log.info(tunnel.getClientOptions().getProperty("inbound.nickname") + ": Building a new socket manager since the old one closed [s=" + s + "]");
tunnel.removeSession(s);
// make sure the old one is closed
socketManager.destroySocketManager();
// We could be here a LONG time, holding the lock
socketManager = buildSocketManager(tunnel, pkf);
} else {