Skip to content

Commit 7c3188d

Browse files
committedJul 20, 2022
[*]优化linux下ICMP存活检测时间为1s,之前为200s
1 parent f9c3fdf commit 7c3188d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎lib/gosping/gosping.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ func OsPing(host string) bool {
1111
case "windows":
1212
cmd = exec.Command("ping", host, "-n", "1", "-w", "200")
1313
case "linux":
14-
cmd = exec.Command("ping", host, "-c", "1", "-w", "200", "-W", "200")
14+
cmd = exec.Command("ping", host, "-c", "1", "-W", "1")
1515
case "darwin":
1616
cmd = exec.Command("ping", host, "-c", "1", "-W", "200")
1717
case "freebsd":

0 commit comments

Comments
 (0)
Please sign in to comment.