diff --git a/vllm/usage/usage_lib.py b/vllm/usage/usage_lib.py index b2ce46c7b8..5197aada59 100644 --- a/vllm/usage/usage_lib.py +++ b/vllm/usage/usage_lib.py @@ -19,7 +19,6 @@ import requests import torch import vllm.envs as envs -from vllm.connections import global_http_connection from vllm.logger import init_logger from vllm.utils.platform_utils import cuda_get_device_properties from vllm.version import __version__ as VLLM_VERSION @@ -265,8 +264,8 @@ class UsageMessage: def _send_to_server(self, data: dict[str, Any]) -> None: try: - global_http_client = global_http_connection.get_sync_client() - global_http_client.post(_USAGE_STATS_SERVER, json=data) + with requests.Session() as client: + client.post(_USAGE_STATS_SERVER, json=data) except requests.exceptions.RequestException: # silently ignore unless we are using debug log logging.debug("Failed to send usage data to server")