From b50671f0411204c7239b044131ad7ca752213621 Mon Sep 17 00:00:00 2001 From: v2ray Date: Tue, 12 Jul 2016 13:43:25 +0200 Subject: [PATCH] fix a bug in process ack --- transport/internet/kcp/sending.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/transport/internet/kcp/sending.go b/transport/internet/kcp/sending.go index daee3e883..0ea7f2024 100644 --- a/transport/internet/kcp/sending.go +++ b/transport/internet/kcp/sending.go @@ -278,7 +278,8 @@ func (this *SendingWorker) FindFirstUnacknowledged() { // @Private func (this *SendingWorker) ProcessAck(number uint32) { - if number-this.firstUnacknowledged > this.window.Size() { + // number < this.firstUnacknowledged || number >= this.nextNumber + if number-this.firstUnacknowledged > 0x7FFFFFFF || number-this.nextNumber < 0x7FFFFFFF { return }