Commit b3f4e8ac by PLN (Algolia)

perf-tray: start the timer after the publish state exists, refresh() crashed on _icon_sig

parent f23ddd63
......@@ -288,11 +288,6 @@ class PerfTray:
self.tray.activated.connect(self.on_tray_activated)
self.tray.show()
self.timer = QTimer()
self.timer.timeout.connect(self.refresh)
self.timer.start(REFRESH_MS)
self.refresh()
# Publish-gating state (2026-11-01 tray-churn fix). The xpswatch tray lane
# measured this process at ~1.9 tray signals/s while idling, all of it from
# refresh() re-pushing the icon, tooltip and menu rows every 2 s: the
......@@ -308,6 +303,12 @@ class PerfTray:
self._health_txt = None
self._headers_txt = (None, None)
# Last: refresh() reads the state above, so it must exist first.
self.timer = QTimer()
self.timer.timeout.connect(self.refresh)
self.timer.start(REFRESH_MS)
self.refresh()
# ------------------------------------------------------------- ending a session
def _rig_is_up(self):
active, _ = sc_state()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment