From: Guus Sliepen Date: Fri, 13 Mar 2020 07:45:44 +0000 (+0100) Subject: Fix congestion window size after a triplicate ACK X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=72b3135830824e441d2dd5c23c030e5dd9f07f5a;p=utcp Fix congestion window size after a triplicate ACK --- diff --git a/utcp.c b/utcp.c index 3a6c506..d7bec9b 100644 --- a/utcp.c +++ b/utcp.c @@ -1454,7 +1454,7 @@ synack: // RFC 5681 fast recovery c->snd.ssthresh = max(c->snd.cwnd / 2, utcp->mtu * 2); // eq. 4 - c->snd.cwnd = max(c->snd.ssthresh + 3 * utcp->mtu, c->sndbuf.maxsize); + c->snd.cwnd = min(c->snd.ssthresh + 3 * utcp->mtu, c->sndbuf.maxsize); if(c->snd.cwnd > c->sndbuf.maxsize) { c->snd.cwnd = c->sndbuf.maxsize;