mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-22 01:57:12 -05:00
sending window fix
This commit is contained in:
parent
ab2cef1c09
commit
f8a614714c
@ -291,10 +291,10 @@ func (kcp *KCP) flush() {
|
||||
|
||||
// calculate window size
|
||||
cwnd := kcp.snd_una + kcp.snd_wnd
|
||||
if cwnd < kcp.rmt_wnd {
|
||||
if cwnd > kcp.rmt_wnd {
|
||||
cwnd = kcp.rmt_wnd
|
||||
}
|
||||
if kcp.congestionControl && cwnd < kcp.snd_una+kcp.cwnd {
|
||||
if kcp.congestionControl && cwnd > kcp.snd_una+kcp.cwnd {
|
||||
cwnd = kcp.snd_una + kcp.cwnd
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user