mirror of
https://github.com/skywind3000/kcp.git
synced 2025-03-14 09:00:06 +08:00
fixed: window recovery is unefficient (by @dearplain)
This commit is contained in:
parent
44986d37d8
commit
d003f99119
6
ikcp.c
6
ikcp.c
@ -882,7 +882,13 @@ int ikcp_input(ikcpcb *kcp, const char *data, long size)
|
||||
if (kcp->incr < mss) kcp->incr = mss;
|
||||
kcp->incr += (mss * mss) / kcp->incr + (mss / 16);
|
||||
if ((kcp->cwnd + 1) * mss <= kcp->incr) {
|
||||
#if 1
|
||||
kcp->cwnd = (kcp->incr + mss - 1) / ((mss > 0)? mss : 1);
|
||||
#else
|
||||
kcp->cwnd++;
|
||||
#endif
|
||||
} else {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (kcp->cwnd > kcp->rmt_wnd) {
|
||||
|
Loading…
Reference in New Issue
Block a user