From 5c78d8108fde867fb7599b663e92c1164465d388 Mon Sep 17 00:00:00 2001 From: jrandom <jrandom> Date: Tue, 10 Jan 2006 02:12:54 +0000 Subject: [PATCH] 2005-01-09 jrandom * Removed a longstanding bug that had caused unnecessary router identity churn due to clock skew * Temporarily sanity check within the streaming lib for long pending writes * Added support for a blog-wide logo to Syndie, and automated the pushing of updated extended blog info data along side the metadata. --- .../java/src/net/i2p/client/streaming/Connection.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/streaming/java/src/net/i2p/client/streaming/Connection.java b/apps/streaming/java/src/net/i2p/client/streaming/Connection.java index 706e7f9b19..e892d75f2b 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/Connection.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/Connection.java @@ -155,6 +155,8 @@ public class Connection { synchronized (_outboundPackets) { if (!started) _context.statManager().addRateData("stream.chokeSizeBegin", _outboundPackets.size(), timeoutMs); + if (start + 5*60*1000 < _context.clock().now()) // ok, 5 minutes blocking? I dont think so + return false; // no need to wait until the other side has ACKed us before sending the first few wsize // packets through @@ -181,7 +183,7 @@ public class Connection { if (_log.shouldLog(Log.DEBUG)) _log.debug("Outbound window is full (" + _outboundPackets.size() + "/" + _activeResends + "), waiting indefinitely"); - try { _outboundPackets.wait(); } catch (InterruptedException ie) {} + try { _outboundPackets.wait(10*1000); } catch (InterruptedException ie) {} } } else { _context.statManager().addRateData("stream.chokeSizeEnd", _outboundPackets.size(), _context.clock().now() - start); -- GitLab