Use -W flag on bsd variants in ping input (#5112)

This commit is contained in:
Alexander Thaller 2018-12-11 01:20:04 +01:00 committed by Daniel Nelson
parent 403a28d078
commit 1170367dd7
1 changed files with 1 additions and 1 deletions

View File

@ -206,7 +206,7 @@ func (p *Ping) args(url string, system string) []string {
case "darwin": case "darwin":
args = append(args, "-W", strconv.FormatFloat(p.Timeout*1000, 'f', -1, 64)) args = append(args, "-W", strconv.FormatFloat(p.Timeout*1000, 'f', -1, 64))
case "freebsd", "netbsd", "openbsd": case "freebsd", "netbsd", "openbsd":
args = append(args, "-w", strconv.FormatFloat(p.Timeout*1000, 'f', -1, 64)) args = append(args, "-W", strconv.FormatFloat(p.Timeout*1000, 'f', -1, 64))
case "linux": case "linux":
args = append(args, "-W", strconv.FormatFloat(p.Timeout, 'f', -1, 64)) args = append(args, "-W", strconv.FormatFloat(p.Timeout, 'f', -1, 64))
default: default: