1
0
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:
v2ray 2016-07-03 09:38:40 +02:00
parent ab2cef1c09
commit f8a614714c
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -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
}