Skip to content

Commit

Permalink
v0.12.1
Browse files Browse the repository at this point in the history
  • Loading branch information
thc committed Jan 25, 2024
1 parent a4c99f4 commit 4b1559d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions icmp-status.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,15 +246,15 @@ func main() {
fmt.Printf("\nICMP summary from %s to %s:\n",
start.Format(dateFormat), end.Format(dateFormat))
if !atLeastOnePacketLoss {
fmt.Printf("\t\t--- No loss ---\n")
fmt.Printf("\t\t\t--- No loss ---\n")

}
mu.Unlock()

// Summary
for host := range hoststats {
mu.Lock()
if ignoreNoLoss && hoststats[host].Sent != 0 && (hoststats[host].Sent-hoststats[host].Received != 0) {
if (hoststats[host].Sent != 0) && ((hoststats[host].Sent-hoststats[host].Received != 0) || !ignoreNoLoss) {
// if hoststats[host].Sent != 0 && (hoststats[host].Sent-hoststats[host].Received != 0) {
num := 100. - float32(hoststats[host].Received)/float32(hoststats[host].Sent)*100

Expand Down

0 comments on commit 4b1559d

Please sign in to comment.