From a979141ab2acfd4e325f5fb9de37cb5d65ab1d88 Mon Sep 17 00:00:00 2001 From: NiLuJe Date: Sat, 12 Oct 2024 19:47:01 +0200 Subject: [PATCH] Kobo: Minor simplification after #12616 (#12629) 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 ;). --- frontend/device/kobo/device.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/device/kobo/device.lua b/frontend/device/kobo/device.lua index 8a2099068..adfb1eb37 100644 --- a/frontend/device/kobo/device.lua +++ b/frontend/device/kobo/device.lua @@ -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