Skip to content

Commit

Permalink
improve ping #4470
Browse files Browse the repository at this point in the history
  • Loading branch information
waruqi committed Dec 5, 2023
1 parent 9355235 commit b8530e7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion xmake/modules/net/ping.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ function _ping(ping, host)
elseif is_host("macosx") then
data = try { function () return os.iorun("%s -c 1 -t 1 %s", ping.program, host) end }
else
data = try { function () return os.iorun("%s -c 1 -W 1 %s", ping.program, host) end }
-- https://github.com/xmake-io/xmake/issues/4470#issuecomment-1840338777
data = try { function () return os.iorun("%s -c 1 -W 1 -n %s", ping.program, host) end }
if not data then
data = try { function () return os.iorun("%s -c 1 -W 1 %s", ping.program, host) end }
end
end
local timeval = "65535"
if data then
Expand Down

0 comments on commit b8530e7

Please sign in to comment.