Przeglądaj źródła

more accurate of rtt calculation

v2ray 9 lat temu
rodzic
commit
72ee6436eb
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      transport/internet/kcp/sending.go

+ 1 - 1
transport/internet/kcp/sending.go

@@ -323,7 +323,7 @@ func (this *SendingWorker) ProcessSegment(current uint32, seg *AckSegment) {
 	for i := 0; i < int(seg.Count); i++ {
 		timestamp := seg.TimestampList[i]
 		number := seg.NumberList[i]
-		if current-timestamp < 10000 {
+		if current-timestamp < 10000 && number-this.firstUnacknowledged <= 0x7FFFFFFF {
 			this.conn.roundTrip.Update(current - timestamp)
 		}
 		this.ProcessAck(number)