Skip to content

Commit

Permalink
fix: double-count of packet number
Browse files Browse the repository at this point in the history
  • Loading branch information
tobbee committed Dec 18, 2024
1 parent 97280dc commit 9fba327
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion cmd/pcap-replay/sender.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ func (u *udpHandler) AddPacket(dst string, udpPayload []byte, timestamp time.Tim
if u.dstDir != "" {
_, _ = u.outfiles[dst].Write(udpPayload)
}
u.pktNr++
timeDiff := timestamp.Sub(u.startTimeStamp)
if u.pktNr%10000 == 0 {
log.Infof("Read and sent %d packets %.3fs (%d repeated)", u.pktNr, timeDiff.Seconds(), u.nrRepeatedPkts)
Expand Down

0 comments on commit 9fba327

Please sign in to comment.