update deps

This commit is contained in:
2025-04-27 18:22:13 +02:00
parent 3584fc1710
commit 8fcb5c5da5
3 changed files with 16 additions and 6 deletions

2
rtt.go
View File

@@ -124,7 +124,7 @@ func (cp *ContinuousPinger) Stats(dSent, dReceive int) (*PingStats, error) {
}
if pkgsInArr == 0 {
return ps, nil
return nil, fmt.Errorf("no packets received")
}
ps.AvgRtt = time.Duration(sum / int64(pkgsInArr))