Skip to content

Commit

Permalink
Kobo: Minor simplification after koreader#12616 (koreader#12629)
Browse files Browse the repository at this point in the history
The only codepath that sets pending_connection to true in NetworkManager calls turnOnWifi right after, so we can't really ever see pending_connection w/o isWifiOn being also true ;).
  • Loading branch information
NiLuJe authored Oct 12, 2024
1 parent 75f7d86 commit a979141
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/device/kobo/device.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1347,7 +1347,7 @@ function Kobo:suspend()
-- Murder Wi-Fi (again, c.f., `Device:onPowerEvent`) if NetworkMgr is attempting to connect or currently connected...
-- (Most likely because of a rerunWhenOnline in a Suspend handler)
local network_mgr = require("ui/network/manager")
if network_mgr:isWifiOn() or network_mgr.pending_connection then
if network_mgr:isWifiOn() then
logger.info("Kobo suspend: had to kill Wi-Fi")
network_mgr:disableWifi()
end
Expand Down

0 comments on commit a979141

Please sign in to comment.