mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
NetworkManager: Bypass isOnline on !hasWifiToggle platforms (#10697)
Followup to #10669, fix #10694
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user