Unverified Commit 8cd754b0 authored by Kevin Di Lallo's avatar Kevin Di Lallo Committed by GitHub
Browse files

Merge pull request #53 from pastorsx/sp_dev_sp33_packet_loss_computation

packet loss computation fix in segment algo
parents bfe5f163 88555433
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -815,9 +815,11 @@ func (algo *SegmentAlgorithm) reCalculateNetChar() {
				//first time it finds a value, it applies it directly
				flow.ComputedPacketLoss = segment.ConfiguredNetChar.PacketLoss
			} else {
				if segment.ConfiguredNetChar.PacketLoss != 0 {
					flow.ComputedPacketLoss += (flow.ComputedPacketLoss * (1 - segment.ConfiguredNetChar.PacketLoss))
				}
			}
		}
		if algo.Config.LogVerbose {
			printFlows(segment)
		}