mirror of https://github.com/v2ray/v2ray-core
fix cwnd
parent
7aa848dc02
commit
9d83fbcb7c
|
@ -423,8 +423,8 @@ func (kcp *KCP) flush() {
|
||||||
|
|
||||||
// calculate window size
|
// calculate window size
|
||||||
cwnd := _imin_(kcp.snd_una+kcp.snd_wnd, kcp.rmt_wnd)
|
cwnd := _imin_(kcp.snd_una+kcp.snd_wnd, kcp.rmt_wnd)
|
||||||
if kcp.congestionControl {
|
if kcp.congestionControl && cwnd < kcp.snd_una+kcp.cwnd {
|
||||||
cwnd = _imin_(kcp.cwnd, cwnd)
|
cwnd = kcp.snd_una + kcp.cwnd
|
||||||
}
|
}
|
||||||
|
|
||||||
for !kcp.snd_queue.IsEmpty() && _itimediff(kcp.snd_nxt, cwnd) < 0 {
|
for !kcp.snd_queue.IsEmpty() && _itimediff(kcp.snd_nxt, cwnd) < 0 {
|
||||||
|
|
Loading…
Reference in New Issue