diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/Connection.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/Connection.java index a06a48809..ed549b8ab 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/Connection.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/Connection.java @@ -421,8 +421,6 @@ class Connection { } long timeout = _options.getRTO(); - if (timeout > MAX_RESEND_DELAY) - timeout = MAX_RESEND_DELAY; if (_log.shouldLog(Log.DEBUG)) _log.debug("Resend in " + timeout + " for " + packet); @@ -1579,9 +1577,7 @@ class Connection { } else { //long timeout = _options.getResendDelay() << numSends; long rto = _options.getRTO(); - if (rto < MIN_RESEND_DELAY) - rto = MIN_RESEND_DELAY; - long timeout = rto << (numSends-1); + long timeout = rto << (numSends-2); if ( (timeout > MAX_RESEND_DELAY) || (timeout <= 0) ) timeout = MAX_RESEND_DELAY; // set this before enqueue() as it passes it on to the router diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionOptions.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionOptions.java index 1d48a33b3..f69f2ed31 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionOptions.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionOptions.java @@ -599,6 +599,9 @@ class ConnectionOptions extends I2PSocketOptionsImpl { } } + /** + * @return Connection.MIN_RESEND_DELAY to Connection.MAX_RESEND_DELAY + */ public synchronized int getRTO() { return _rto; } /** used in TCB @since 0.9.8 */ @@ -642,13 +645,15 @@ class ConnectionOptions extends I2PSocketOptionsImpl { * Double the RTO (after congestion). * See RFC 6298 section 5 item 5.5 * + * @return new value, Connection.MIN_RESEND_DELAY to Connection.MAX_RESEND_DELAY * @since 0.9.33 */ - synchronized void doubleRTO() { + synchronized int doubleRTO() { // we don't need to switch on _initState, _rto is set in constructor _rto *= 2; if (_rto > Connection.MAX_RESEND_DELAY) _rto = (int)Connection.MAX_RESEND_DELAY; + return _rto; } /** @@ -707,8 +712,9 @@ class ConnectionOptions extends I2PSocketOptionsImpl { * @return ACK delay in ms */ public int getSendAckDelay() { return _sendAckDelay; } + /** - * Unused except here, so expect the default initial delay of 2000 ms unless set by the user + * Unused except here, so expect the default initial delay of DEFAULT_INITIAL_ACK_DELAY unless set by the user * to remain constant. */ public void setSendAckDelay(int delayMs) { _sendAckDelay = delayMs; } diff --git a/history.txt b/history.txt index 77ca98327..e2e6e6dde 100644 --- a/history.txt +++ b/history.txt @@ -1,3 +1,9 @@ +2020-04-10 zzz + * Streaming: Fix retransmission time (ticket #2709) + +2020-04-10 zzz + * Jetty: Add GzipHandler for eepsites on Jetty 9.3/9.4 (ticket #2599) + 2020-04-08 zzz * i2psnark: Give peers preference to get first pieces (ticket #2473) * NetDB: Remove class M from auto-floodfill diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java index fecba78d6..a6204817e 100644 --- a/router/java/src/net/i2p/router/RouterVersion.java +++ b/router/java/src/net/i2p/router/RouterVersion.java @@ -18,7 +18,7 @@ public class RouterVersion { /** deprecated */ public final static String ID = "Monotone"; public final static String VERSION = CoreVersion.VERSION; - public final static long BUILD = 7; + public final static long BUILD = 8; /** for example "-test" */ public final static String EXTRA = "";