mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-09 08:18:12 +00:00
fix(proxy): release Presidio session lock before requests
This commit is contained in:
parent
047cb4a8e2
commit
b68ac32580
1 changed files with 2 additions and 1 deletions
|
|
@ -388,7 +388,8 @@ class _OPTIONAL_PresidioPIIMasking(CustomGuardrail):
|
|||
async with self._session_lock:
|
||||
if self._http_session is None or self._http_session.closed:
|
||||
self._http_session = aiohttp.ClientSession()
|
||||
yield self._http_session
|
||||
session = self._http_session
|
||||
yield session
|
||||
else:
|
||||
# Background thread/loop -> use loop-bound session cache
|
||||
# This avoids "attached to a different loop" or "no running event loop" errors
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue