* SOCKS: Reduce log level of connect errors

This commit is contained in:
zzz
2012-11-13 20:36:42 +00:00
parent 9741d127a9
commit e6dbd7ddda
2 changed files with 6 additions and 2 deletions

View File

@@ -15,6 +15,7 @@ import net.i2p.i2ptunnel.irc.IrcOutboundFilter;
import net.i2p.i2ptunnel.Logging; import net.i2p.i2ptunnel.Logging;
import net.i2p.util.EventDispatcher; import net.i2p.util.EventDispatcher;
import net.i2p.util.I2PAppThread; import net.i2p.util.I2PAppThread;
import net.i2p.util.Log;
/* /*
* Pipe SOCKS IRC connections through I2PTunnelIRCClient filtering, * Pipe SOCKS IRC connections through I2PTunnelIRCClient filtering,
@@ -56,7 +57,8 @@ public class I2PSOCKSIRCTunnel extends I2PSOCKSTunnel {
"SOCKS IRC Client " + __clientId + " out", true); "SOCKS IRC Client " + __clientId + " out", true);
out.start(); out.start();
} catch (SOCKSException e) { } catch (SOCKSException e) {
_log.error("Error from SOCKS connection", e); if (_log.shouldLog(Log.WARN))
_log.warn("Error from SOCKS connection", e);
closeSocket(s); closeSocket(s);
} }
} }

View File

@@ -22,6 +22,7 @@ import net.i2p.i2ptunnel.I2PTunnelClientBase;
import net.i2p.i2ptunnel.I2PTunnelRunner; import net.i2p.i2ptunnel.I2PTunnelRunner;
import net.i2p.i2ptunnel.Logging; import net.i2p.i2ptunnel.Logging;
import net.i2p.util.EventDispatcher; import net.i2p.util.EventDispatcher;
import net.i2p.util.Log;
public class I2PSOCKSTunnel extends I2PTunnelClientBase { public class I2PSOCKSTunnel extends I2PTunnelClientBase {
@@ -55,7 +56,8 @@ public class I2PSOCKSTunnel extends I2PTunnelClientBase {
I2PSocket destSock = serv.getDestinationI2PSocket(this); I2PSocket destSock = serv.getDestinationI2PSocket(this);
new I2PTunnelRunner(clientSock, destSock, sockLock, null, mySockets); new I2PTunnelRunner(clientSock, destSock, sockLock, null, mySockets);
} catch (SOCKSException e) { } catch (SOCKSException e) {
_log.error("Error from SOCKS connection", e); if (_log.shouldLog(Log.WARN))
_log.warn("Error from SOCKS connection", e);
closeSocket(s); closeSocket(s);
} }
} }