pull/215/head
v2ray 2016-06-30 11:19:35 +02:00
parent 7aa848dc02
commit 9d83fbcb7c
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169
1 changed files with 2 additions and 2 deletions

View File

@ -423,8 +423,8 @@ func (kcp *KCP) flush() {
// calculate window size
cwnd := _imin_(kcp.snd_una+kcp.snd_wnd, kcp.rmt_wnd)
if kcp.congestionControl {
cwnd = _imin_(kcp.cwnd, cwnd)
if kcp.congestionControl && cwnd < kcp.snd_una+kcp.cwnd {
cwnd = kcp.snd_una + kcp.cwnd
}
for !kcp.snd_queue.IsEmpty() && _itimediff(kcp.snd_nxt, cwnd) < 0 {