diff options
| author | ruki <[email protected]> | 2022-12-13 00:59:54 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-12-13 00:59:54 +0800 |
| commit | 06876b8b33ae91a5dd12f8b94b295f3546885c8a (patch) | |
| tree | 5094455c087ffd91c2df88c216db317ddaf32e02 /xmake/modules/net/ping.lua | |
| parent | 7a44e5daa628d0877d5c05db68e5aad1831f438f (diff) | |
improve ping
Diffstat (limited to 'xmake/modules/net/ping.lua')
| -rw-r--r-- | xmake/modules/net/ping.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/modules/net/ping.lua b/xmake/modules/net/ping.lua index 98766cece..add89739c 100644 --- a/xmake/modules/net/ping.lua +++ b/xmake/modules/net/ping.lua @@ -35,7 +35,7 @@ function _ping(ping, host) end local timeval = "65535" if data then - timeval = data:match("time=([%d%s%.]-)ms", 1, true) or data:match("=([%d%s%.]-)ms TTL", 1, true) or "65535" + timeval = data:match("time[=<]([%d%s%.]-)ms", 1, true) or data:match("[=<]([%d%s%.]-)ms TTL", 1, true) or "65535" end if timeval then timeval = tonumber(timeval:trim()) |
