v2ray преди 9 години
родител
ревизия
0eaa3ba27a
променени са 1 файла, в които са добавени 1 реда и са изтрити 9 реда
  1. 1 9
      transport/internet/kcp/receiving.go

+ 1 - 9
transport/internet/kcp/receiving.go

@@ -255,19 +255,11 @@ func (this *ReceivingWorker) ProcessSegment(seg *DataSegment) {
 	this.ProcessSendingNext(seg.SendingNext)
 	this.acklist.Add(number, seg.Timestamp)
 	this.windowMutex.Lock()
+	defer this.windowMutex.Unlock()
 
 	if !this.window.Set(idx, seg) {
 		seg.Release()
 	}
-	this.windowMutex.Unlock()
-
-	this.DumpWindow()
-}
-
-// @Private
-func (this *ReceivingWorker) DumpWindow() {
-	this.windowMutex.Lock()
-	defer this.windowMutex.Unlock()
 
 	for {
 		seg := this.window.RemoveFirst()