Skip to content

Commit

Permalink
[*]优化linux下ICMP存活检测时间为1s,之前为200s
Browse files Browse the repository at this point in the history
  • Loading branch information
lcvvvv committed Jul 20, 2022
1 parent f9c3fdf commit 7c3188d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/gosping/gosping.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ func OsPing(host string) bool {
case "windows":
cmd = exec.Command("ping", host, "-n", "1", "-w", "200")
case "linux":
cmd = exec.Command("ping", host, "-c", "1", "-w", "200", "-W", "200")
cmd = exec.Command("ping", host, "-c", "1", "-W", "1")
case "darwin":
cmd = exec.Command("ping", host, "-c", "1", "-W", "200")
case "freebsd":
Expand Down

0 comments on commit 7c3188d

Please sign in to comment.