Catch channel cache issues on set_channel failure during eviction

This commit is contained in:
Jack Kingsman
2026-03-13 11:09:23 -07:00
parent 9c2b6f0744
commit 2369e69e0a
2 changed files with 75 additions and 5 deletions
+12 -5
View File
@@ -82,12 +82,19 @@ async def send_channel_message_with_effective_scope(
else ""
),
)
set_result = await mc.commands.set_channel(
channel_idx=channel_slot,
channel_name=channel.name,
channel_secret=key_bytes,
)
try:
set_result = await mc.commands.set_channel(
channel_idx=channel_slot,
channel_name=channel.name,
channel_secret=key_bytes,
)
except Exception:
if evicted_channel_key is not None:
radio_manager.invalidate_cached_channel_slot(evicted_channel_key)
raise
if set_result.type == EventType.ERROR:
if evicted_channel_key is not None:
radio_manager.invalidate_cached_channel_slot(evicted_channel_key)
logger.warning(
"Failed to set channel on radio slot %d before %s: %s",
channel_slot,