From 40f0cb65a1a7f905d45bf0720b5d0af35f70f462 Mon Sep 17 00:00:00 2001
From: zzz <zzz@mail.i2p>
Date: Wed, 16 Jul 2008 15:04:02 +0000
Subject: [PATCH]     * SSU:         Don't proactively reconnect until 30m
 idle, so         we don't lose introducer tags prematurely

---
 .../src/net/i2p/router/transport/udp/UDPTransport.java   | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/router/java/src/net/i2p/router/transport/udp/UDPTransport.java b/router/java/src/net/i2p/router/transport/udp/UDPTransport.java
index 6191a64ce6..7271f06b07 100644
--- a/router/java/src/net/i2p/router/transport/udp/UDPTransport.java
+++ b/router/java/src/net/i2p/router/transport/udp/UDPTransport.java
@@ -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;
-- 
GitLab