UDT: Fix another critical new bug in getRcvSpeeds. CC #43

This commit is contained in:
Kleissner
2021-10-25 04:05:53 +02:00
parent b0d71c2dc7
commit 57450e506f

View File

@@ -453,7 +453,7 @@ func (s *udtSocketRecv) getRcvSpeeds() (recvSpeed, bandwidth int) {
}
// get median value, but cannot change the original value order in the window
if s.recvPktPairHistory == nil {
if s.recvPktPairHistory != nil {
ourProbeHistory := make(sortableDurnArray, len(s.recvPktPairHistory))
copy(ourProbeHistory, s.recvPktPairHistory)
n := len(ourProbeHistory)