forked from I2P_Developers/i2p.i2p
Ticket #1047 : Do not adjust window on receiving dups.
This commit is contained in:
@ -365,22 +365,8 @@ class ConnectionPacketHandler {
|
|||||||
private boolean adjustWindow(Connection con, boolean isNew, long sequenceNum, int numResends, int acked, boolean choke) {
|
private boolean adjustWindow(Connection con, boolean isNew, long sequenceNum, int numResends, int acked, boolean choke) {
|
||||||
boolean congested = false;
|
boolean congested = false;
|
||||||
if ( (!isNew) && (sequenceNum > 0) ) {
|
if ( (!isNew) && (sequenceNum > 0) ) {
|
||||||
// dup real packet, or they told us to back off
|
|
||||||
int oldSize = con.getOptions().getWindowSize();
|
|
||||||
con.congestionOccurred();
|
|
||||||
oldSize >>>= 1;
|
|
||||||
if (oldSize <= 0)
|
|
||||||
oldSize = 1;
|
|
||||||
|
|
||||||
// setRTT has its own ceiling
|
|
||||||
//con.getOptions().setRTT(con.getOptions().getRTT() + 10*1000);
|
|
||||||
con.getOptions().setWindowSize(oldSize);
|
|
||||||
|
|
||||||
if (_log.shouldLog(Log.DEBUG))
|
if (_log.shouldLog(Log.DEBUG))
|
||||||
_log.debug("Congestion occurred - new windowSize " + oldSize + " / " + con.getOptions().getWindowSize() + " congestionSeenAt: "
|
_log.debug("Congestion occurred on the sending side. Not adjusting window "+con);
|
||||||
+ con.getLastCongestionSeenAt() + " (#resends: " + numResends
|
|
||||||
+ ") for " + con);
|
|
||||||
|
|
||||||
|
|
||||||
congested = true;
|
congested = true;
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ public class RouterVersion {
|
|||||||
/** deprecated */
|
/** deprecated */
|
||||||
public final static String ID = "Monotone";
|
public final static String ID = "Monotone";
|
||||||
public final static String VERSION = CoreVersion.VERSION;
|
public final static String VERSION = CoreVersion.VERSION;
|
||||||
public final static long BUILD = 32;
|
public final static long BUILD = 33;
|
||||||
|
|
||||||
/** for example "-test" */
|
/** for example "-test" */
|
||||||
public final static String EXTRA = "-rc";
|
public final static String EXTRA = "-rc";
|
||||||
|
Reference in New Issue
Block a user