diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionHandler.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionHandler.java index 213ee9c3af..478dfb76ca 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionHandler.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionHandler.java @@ -64,8 +64,8 @@ class ConnectionHandler { public synchronized void setActive(boolean active) { // FIXME active=false this only kills for one thread in accept() // if there are more, they won't get a poison packet. - if (_log.shouldLog(Log.WARN)) - _log.warn("setActive(" + active + ") called, previously " + _active, new Exception("I did it")); + if (_log.shouldInfo()) + _log.info("setActive(" + active + ") called, previously " + _active, new Exception("I did it")); // if starting, clear any old poison if (active && !_active) { _restartPending = false; diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/I2PSocketOptionsImpl.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/I2PSocketOptionsImpl.java index 903e48a859..1dd16901e8 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/I2PSocketOptionsImpl.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/I2PSocketOptionsImpl.java @@ -17,6 +17,7 @@ class I2PSocketOptionsImpl implements I2PSocketOptions { private int _remotePort; public static final int DEFAULT_BUFFER_SIZE = 1024*64; + public static final int DEFAULT_READ_TIMEOUT = -1; public static final int DEFAULT_WRITE_TIMEOUT = -1; public static final int DEFAULT_CONNECT_TIMEOUT = 60*1000; @@ -71,7 +72,7 @@ class I2PSocketOptionsImpl implements I2PSocketOptions { if (opts.getProperty(PROP_CONNECT_TIMEOUT) != null) _connectTimeout = getInt(opts, PROP_CONNECT_TIMEOUT, DEFAULT_CONNECT_TIMEOUT); if (opts.getProperty(PROP_READ_TIMEOUT) != null) - _readTimeout = getInt(opts, PROP_READ_TIMEOUT, -1); + _readTimeout = getInt(opts, PROP_READ_TIMEOUT, DEFAULT_READ_TIMEOUT); if (opts.getProperty(PROP_WRITE_TIMEOUT) != null) _writeTimeout = getInt(opts, PROP_WRITE_TIMEOUT, DEFAULT_WRITE_TIMEOUT); } diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/MessageInputStream.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/MessageInputStream.java index de7752cd6b..ba73aa5511 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/MessageInputStream.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/MessageInputStream.java @@ -74,7 +74,7 @@ class MessageInputStream extends InputStream { _readyDataBlocks = new ArrayList(4); _highestReadyBlockId = -1; _highestBlockId = -1; - _readTimeout = -1; + _readTimeout = I2PSocketOptionsImpl.DEFAULT_READ_TIMEOUT; _notYetReadyBlocks = new HashMap(4); _dataLock = new Object(); _maxMessageSize = maxMessageSize;