I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit bd9c6ff4 authored by jrandom's avatar jrandom Committed by zzz
Browse files

oops (allow cwin=1 for interactive streams)

parent a0c822af
No related branches found
No related tags found
No related merge requests found
...@@ -181,12 +181,15 @@ public class ConnectionOptions extends I2PSocketOptionsImpl { ...@@ -181,12 +181,15 @@ public class ConnectionOptions extends I2PSocketOptionsImpl {
*/ */
public int getWindowSize() { return _windowSize; } public int getWindowSize() { return _windowSize; }
public void setWindowSize(int numMsgs) { public void setWindowSize(int numMsgs) {
if (numMsgs > _maxWindowSize) if (numMsgs <= 0)
numMsgs = _maxWindowSize;
else if (numMsgs <= 0)
numMsgs = 1; numMsgs = 1;
if (numMsgs < MIN_WINDOW_SIZE) if (numMsgs < MIN_WINDOW_SIZE)
numMsgs = MIN_WINDOW_SIZE; numMsgs = MIN_WINDOW_SIZE;
// the stream's max window size may be less than the min window size, for
// instance, with interactive streams of cwin=1. This is why we test it here
// after checking MIN_WINDOW_SIZE
if (numMsgs > _maxWindowSize)
numMsgs = _maxWindowSize;
_windowSize = numMsgs; _windowSize = numMsgs;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment