From e6dbd7ddda3b0f362e71e6224e729202e31f7bd2 Mon Sep 17 00:00:00 2001
From: zzz <zzz@mail.i2p>
Date: Tue, 13 Nov 2012 20:36:42 +0000
Subject: [PATCH]  * SOCKS: Reduce log level of connect errors

---
 .../java/src/net/i2p/i2ptunnel/socks/I2PSOCKSIRCTunnel.java   | 4 +++-
 .../java/src/net/i2p/i2ptunnel/socks/I2PSOCKSTunnel.java      | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/socks/I2PSOCKSIRCTunnel.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/socks/I2PSOCKSIRCTunnel.java
index 566ed1731c..2c0fc2d776 100644
--- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/socks/I2PSOCKSIRCTunnel.java
+++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/socks/I2PSOCKSIRCTunnel.java
@@ -15,6 +15,7 @@ import net.i2p.i2ptunnel.irc.IrcOutboundFilter;
 import net.i2p.i2ptunnel.Logging;
 import net.i2p.util.EventDispatcher;
 import net.i2p.util.I2PAppThread;
+import net.i2p.util.Log;
 
 /*
  * Pipe SOCKS IRC connections through I2PTunnelIRCClient filtering,
@@ -56,7 +57,8 @@ public class I2PSOCKSIRCTunnel extends I2PSOCKSTunnel {
                                           "SOCKS IRC Client " + __clientId + " out", true);
             out.start();
         } catch (SOCKSException e) {
-            _log.error("Error from SOCKS connection", e);
+            if (_log.shouldLog(Log.WARN))
+                _log.warn("Error from SOCKS connection", e);
             closeSocket(s);
         }
     }
diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/socks/I2PSOCKSTunnel.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/socks/I2PSOCKSTunnel.java
index 9d6439c37f..1cf873966d 100644
--- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/socks/I2PSOCKSTunnel.java
+++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/socks/I2PSOCKSTunnel.java
@@ -22,6 +22,7 @@ import net.i2p.i2ptunnel.I2PTunnelClientBase;
 import net.i2p.i2ptunnel.I2PTunnelRunner;
 import net.i2p.i2ptunnel.Logging;
 import net.i2p.util.EventDispatcher;
+import net.i2p.util.Log;
 
 public class I2PSOCKSTunnel extends I2PTunnelClientBase {
 
@@ -55,7 +56,8 @@ public class I2PSOCKSTunnel extends I2PTunnelClientBase {
             I2PSocket destSock = serv.getDestinationI2PSocket(this);
             new I2PTunnelRunner(clientSock, destSock, sockLock, null, mySockets);
         } catch (SOCKSException e) {
-            _log.error("Error from SOCKS connection", e);
+            if (_log.shouldLog(Log.WARN))
+                _log.warn("Error from SOCKS connection", e);
             closeSocket(s);
         }
     }
-- 
GitLab