From 9c3ebc0453aa0029b81f4bd828113a4286bfa464 Mon Sep 17 00:00:00 2001 From: v2ray Date: Sun, 3 Jul 2016 23:16:48 +0200 Subject: [PATCH] allow control window larger than sending window --- transport/internet/kcp/sending.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transport/internet/kcp/sending.go b/transport/internet/kcp/sending.go index e2fc2ae1..e1c6fcb7 100644 --- a/transport/internet/kcp/sending.go +++ b/transport/internet/kcp/sending.go @@ -341,8 +341,8 @@ func (this *SendingWorker) OnPacketLoss(lost bool) { if this.controlWindow < 4 { this.controlWindow = 4 } - if this.controlWindow > this.windowSize { - this.controlWindow = this.windowSize + if this.controlWindow > 2*this.windowSize { + this.controlWindow = 2 * this.windowSize } }