From a72fc6f08d1130e668eb543ea86e12159fb0ad9c Mon Sep 17 00:00:00 2001 From: Stacy Olivas Date: Wed, 25 Mar 2026 20:49:14 -0700 Subject: [PATCH] fix: prevent packetcapture restart storm during radio reconnect --- modules/service_plugins/packet_capture_service.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/service_plugins/packet_capture_service.py b/modules/service_plugins/packet_capture_service.py index 9e1f277..ff89aae 100644 --- a/modules/service_plugins/packet_capture_service.py +++ b/modules/service_plugins/packet_capture_service.py @@ -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.