From 066e5e216db1526a3d31cbd163c96deb6852fc4d Mon Sep 17 00:00:00 2001 From: v2ray Date: Fri, 15 Jul 2016 23:23:21 +0200 Subject: [PATCH] fill windows after processing acks --- 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 88c29688..e6022c7a 100644 --- a/transport/internet/kcp/sending.go +++ b/transport/internet/kcp/sending.go @@ -317,13 +317,12 @@ func (this *SendingWorker) ProcessSegment(current uint32, seg *AckSegment) { this.remoteNextNumber = seg.ReceivingWindow } this.ProcessReceivingNextWithoutLock(seg.ReceivingNext) - this.FillWindow(current) var maxack uint32 for i := 0; i < int(seg.Count); i++ { timestamp := seg.TimestampList[i] number := seg.NumberList[i] - if current-timestamp < 10000 && number-this.firstUnacknowledged <= 0x7FFFFFFF { + if current-timestamp < 10000 { this.conn.roundTrip.Update(current - timestamp) } this.ProcessAck(number) @@ -333,6 +332,7 @@ func (this *SendingWorker) ProcessSegment(current uint32, seg *AckSegment) { } this.window.HandleFastAck(maxack) + this.FillWindow(current) } func (this *SendingWorker) Push(b []byte) int {