From 953b64af4a92ae581d96b7fe84775914c0bbc27c Mon Sep 17 00:00:00 2001
From: zzz <zzz@i2pmail.org>
Date: Mon, 29 Mar 2021 13:38:18 -0400
Subject: [PATCH] SSU: Don't request introducers when hidden

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

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 d4be00c3ae..402a3432ca 100644
--- a/router/java/src/net/i2p/router/transport/udp/UDPTransport.java
+++ b/router/java/src/net/i2p/router/transport/udp/UDPTransport.java
@@ -2836,7 +2836,9 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
     /**
      *  Do we require introducers?
      */
-    public boolean introducersRequired(boolean ipv6) {
+    private boolean introducersRequired(boolean ipv6) {
+        if (_context.router().isHidden())
+            return false;
         //if (ipv6) return false;
         /******************
          *  Don't do this anymore, as we are removing the checkbox from the UI,
@@ -2898,6 +2900,8 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
      *  @since 0.9.24
      */
     boolean introducersMaybeRequired(boolean ipv6) {
+        if (_context.router().isHidden())
+            return false;
         //if (ipv6) return false;
         Status status = getReachabilityStatus();
         TransportUtil.IPv6Config config = getIPv6Config();
-- 
GitLab