summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/modules/net/ping.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/modules/net/ping.lua b/xmake/modules/net/ping.lua
index c23a69983..94bf58b64 100644
--- a/xmake/modules/net/ping.lua
+++ b/xmake/modules/net/ping.lua
@@ -76,7 +76,7 @@ function main(hosts, opt)
end
-- find time
- local timeval = data:match("time=(.-)ms", 1, true) or "65535"
+ local timeval = data:match("time=([%d%s%.]-)ms", 1, true) or data:match("=([%d%s%.]-)ms TTL", 1, true) or "65535"
if timeval then
timeval = tonumber(timeval:trim())
end