Pause autofetch during poll loop

This commit is contained in:
Jack Kingsman
2026-02-24 20:30:39 -08:00
parent 2757f25eb9
commit 932ea6b65d
2 changed files with 3 additions and 0 deletions

View File

@@ -315,6 +315,7 @@ async def _message_poll_loop():
async with radio_manager.radio_operation(
"message_poll_loop",
blocking=False,
suspend_auto_fetch=True,
) as mc:
await poll_for_messages(mc)
except RadioOperationBusyError:

View File

@@ -843,6 +843,8 @@ def _make_connected_manager() -> tuple[RadioManager, MagicMock]:
rm = RadioManager()
mock_mc = MagicMock(name="lock_scoped_mc")
mock_mc.is_connected = True
mock_mc.stop_auto_message_fetching = AsyncMock()
mock_mc.start_auto_message_fetching = AsyncMock()
rm._meshcore = mock_mc
return rm, mock_mc