NetworkManager: Bypass isOnline on !hasWifiToggle platforms (#10697)

Followup to #10669, fix #10694
This commit is contained in:
NiLuJe
2023-07-15 23:58:51 +02:00
committed by GitHub
parent 3bec20fc25
commit dacc3c2f72

View File

@@ -396,6 +396,11 @@ function NetworkMgr:afterWifiAction(callback)
end
function NetworkMgr:isOnline()
-- For the same reasons as isWifiOn and isConnected above, bypass this on !hasWifiToggle platforms.
if not Device:hasWifiToggle() then
return true
end
local socket = require("socket")
-- Microsoft uses `dns.msftncsi.com` for Windows, see
-- <https://technet.microsoft.com/en-us/library/ee126135#BKMK_How> for