diff --git a/ping-package.go b/ping-package.go index e222d90..61d7049 100644 --- a/ping-package.go +++ b/ping-package.go @@ -33,7 +33,7 @@ type WaybarOut struct { } func formatLine(stats *probing.Statistics) { - if stats.PacketLoss >= 100.0 { + if stats.PacketLoss >= 100.0 || stats.PacketsRecv == 0 { // fontawesome/forkawesome doesn't have the fitting icon... // so this is the utf-8 icon/emoji fmt.Printf("%%{F#%s}🚫\n", CritColor) @@ -91,6 +91,7 @@ func main() { goto sleep } pinger.Count = *PingCount + pinger.Timeout = 3 * time.Second if *Waybar { pinger.OnFinish = formatLineWaybar } else {