Skip to content

Commit 83d8c54

Browse files
authored
fix ping binary arguments for linux vs macos (#74)
1 parent 034c06d commit 83d8c54

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: src/transport/icmp/ping.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,10 @@ func (execPing) ping(addr string) (success bool, err error) {
7171
switch runtime.GOOS {
7272
case "windows":
7373
args = []string{pingPath, "-n", "1", "-w", "1000", addr}
74-
default:
74+
case "darwin":
7575
args = []string{pingPath, "-c", "1", "-t", "1", addr}
76+
default: //Linux, hopefully any others also use this format
77+
args = []string{pingPath, "-c", "1", "-W", "1", addr}
7678
}
7779

7880
cmd := &exec.Cmd{

0 commit comments

Comments
 (0)