fix: prevent packetcapture restart storm during radio reconnect

This commit is contained in:
Stacy Olivas
2026-04-09 21:30:58 -07:00
parent a1b4b33a29
commit a72fc6f08d
@@ -318,10 +318,11 @@ class PacketCaptureService(BaseServicePlugin):
return self.bot.meshcore if self.bot else None
def is_healthy(self) -> bool:
return (
self._running
and bool(self.meshcore and self.meshcore.is_connected)
)
# Only check internal running state, not radio connection.
# Radio disconnects are transient — the service resumes naturally
# when the radio reconnects. Checking meshcore.is_connected here
# causes a restart storm during every radio reconnect cycle.
return self._running
async def start(self) -> None:
"""Start the packet capture service.