From 5c67cf0e0ce9eae3d2128d59f835aea3da2f8fd2 Mon Sep 17 00:00:00 2001 From: Sameer Kankute Date: Fri, 24 Apr 2026 17:17:09 +0530 Subject: [PATCH] Replaced the async client violation --- litellm/integrations/rubrik.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/litellm/integrations/rubrik.py b/litellm/integrations/rubrik.py index e901ec5fbb..854af7b1ab 100644 --- a/litellm/integrations/rubrik.py +++ b/litellm/integrations/rubrik.py @@ -112,10 +112,9 @@ class RubrikLogger(CustomGuardrail, CustomBatchLogger): llm_provider=httpxSpecialProvider.LoggingCallback ) - # Dedicated client to avoid connection pooling issues with LiteLLM's shared client - self.tool_blocking_client = httpx.AsyncClient( - timeout=httpx.Timeout(5.0, connect=2.0), - limits=httpx.Limits(max_connections=10, max_keepalive_connections=5), + self.tool_blocking_client = get_async_httpx_client( + llm_provider=httpxSpecialProvider.LoggingCallback, + params={"timeout": httpx.Timeout(5.0, connect=2.0)}, ) self._headers: dict[str, str] = {"Content-Type": "application/json"} @@ -126,7 +125,7 @@ class RubrikLogger(CustomGuardrail, CustomBatchLogger): async def aclose(self): """Close the dedicated tool blocking HTTP client.""" - await self.tool_blocking_client.aclose() + await self.tool_blocking_client.close() # -- Guardrail hook --------------------------------------------------------