From 6a75ea84d9f2bd86799f0e3a2336a01f1ed91c0b Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Sat, 18 Jul 2026 14:13:27 +0545 Subject: [PATCH] fix(controlcenter): remove duplicate device-ready signal connection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Handler was connected twice — once in __init__ and again in _initialize_resources. Every device-ready event fired on_network_ready twice. Removed the __init__ connection (the lazy one is correct). --- src/window/controlcenter/main.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/window/controlcenter/main.py b/src/window/controlcenter/main.py index 93a4918..fe9383f 100644 --- a/src/window/controlcenter/main.py +++ b/src/window/controlcenter/main.py @@ -495,7 +495,6 @@ class ModusControlCenter(AppletWindow): # Initialize network service upfront so WifiConnections can use it self.network_service = NetworkClient() - self.network_service.connect("device-ready", self.on_network_ready) self.wifi_man = WifiConnections(self, network_service=self.network_service) self.bluetooth_man = BluetoothConnections(self) @@ -826,8 +825,8 @@ class ModusControlCenter(AppletWindow): try: with open(_CAFFEINE_PID_FILE, "w") as f: f.write(str(proc.pid)) - except OSError: - pass + except OSError as e: + logger.warning(f"[controlcenter] Failed to write caffeine PID file: {e}") self.caffeine_mode = True self.caffeine_icon.dynamic_file( "applets/caffeine-on.svg"