diff --git a/transport/internet/kcp/sending.go b/transport/internet/kcp/sending.go index daee3e88..0ea7f202 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 }