Commit 88555433 authored by Simon Pastor's avatar Simon Pastor
Browse files

packet loss computation fix in segment algo

parent bfe5f163
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)
		}