Fix unprotected _clean_redis_keys() call in check_if_channel_exists

Wrap _clean_redis_keys() call in check_if_channel_exists() with
try/except to prevent exception propagation when Channel/Stream
lookup or release_stream() encounters DB or Redis errors.
This commit is contained in:
None 2026-02-11 20:09:17 -06:00
parent fe17d0d585
commit 6360271e28

View file

@ -766,7 +766,10 @@ class ProxyServer:
if self.redis_client.exists(key):
# Found orphaned keys without metadata - clean them up
logger.warning(f"Found orphaned keys for channel {channel_id} without metadata - cleaning up")
self._clean_redis_keys(channel_id)
try:
self._clean_redis_keys(channel_id)
except Exception as e:
logger.error(f"Error cleaning redis keys for channel {channel_id}: {e}")
return False
return False