fix: also close sync clients on eviction from LLMClientCache

This commit is contained in:
Ryan Crabbe 2026-02-20 17:36:28 -08:00
parent d6c6d12549
commit bfeed0e590

View file

@ -21,6 +21,11 @@ class LLMClientCache(InMemoryCache):
asyncio.get_running_loop().create_task(close_fn())
except RuntimeError:
pass
elif close_fn and callable(close_fn):
try:
close_fn()
except Exception:
pass
def update_cache_key_with_event_loop(self, key):
"""