Don't proactively reconnect until 30m idle, so
        we don't lose introducer tags prematurely
This commit is contained in:
zzz
2008-07-16 15:04:02 +00:00
parent 2ba9929277
commit 40f0cb65a1

View File

@ -916,7 +916,12 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
return (pref != null) && "always".equals(pref);
}
private static final int MAX_IDLE_TIME = 5*60*1000;
// We used to have MAX_IDLE_TIME = 5m, but this causes us to drop peers
// and lose the old introducer tags, causing introduction fails,
// so we keep the max time long to give the introducer keepalive code
// in the IntroductionManager a chance to work.
public static final int EXPIRE_TIMEOUT = 30*60*1000;
private static final int MAX_IDLE_TIME = EXPIRE_TIMEOUT;
public String getStyle() { return STYLE; }
public void send(OutNetMessage msg) {
@ -1939,8 +1944,6 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
public String toString() { return "UDP bid @ " + getLatencyMs(); }
}
public static final int EXPIRE_TIMEOUT = 30*60*1000;
private class ExpirePeerEvent implements SimpleTimer.TimedEvent {
private List _expirePeers;
private List _expireBuffer;