Ticket #1047 : Do not adjust window on receiving dups.

This commit is contained in:
zab2
2013-11-25 19:21:27 +00:00
parent dbdf36d85c
commit 35b6926e4f
2 changed files with 2 additions and 16 deletions

View File

@ -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;
} }

View File

@ -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";