From a4019a6900c4cc3db420891ea50c92aac0576083 Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Fri, 2 Dec 2016 21:40:58 +0100 Subject: [PATCH] fast return on zero ack list --- transport/internet/kcp/sending.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/transport/internet/kcp/sending.go b/transport/internet/kcp/sending.go index 60d36c84..8bcee9af 100644 --- a/transport/internet/kcp/sending.go +++ b/transport/internet/kcp/sending.go @@ -255,6 +255,10 @@ func (v *SendingWorker) ProcessSegment(current uint32, seg *AckSegment, rto uint } v.ProcessReceivingNextWithoutLock(seg.ReceivingNext) + if seg.Count == 0 { + return + } + var maxack uint32 var maxackRemoved bool for i := 0; i < int(seg.Count); i++ {