From cddc2f6c86ebd7443cb9562330da14b8f49f5365 Mon Sep 17 00:00:00 2001 From: Alex Baker Date: Fri, 31 Oct 2025 19:04:39 -0700 Subject: [PATCH] Add timeout to AppStoreServerAPIClient --- appstoreserverlibrary/api_client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appstoreserverlibrary/api_client.py b/appstoreserverlibrary/api_client.py index bd583464..7932d4f2 100644 --- a/appstoreserverlibrary/api_client.py +++ b/appstoreserverlibrary/api_client.py @@ -682,7 +682,7 @@ def _make_request(self, path: str, method: str, queryParameters: Dict[str, Union return self._parse_response(response.status_code, response.headers, lambda: response.json(), destination_class) def _execute_request(self, method: str, url: str, params: Dict[str, Union[str, List[str]]], headers: Dict[str, str], json: Optional[Dict[str, Any]], data: Optional[bytes]) -> requests.Response: - return requests.request(method, url, params=params, headers=headers, json=json, data=data) + return requests.request(method, url, params=params, headers=headers, json=json, data=data, timeout=30) def extend_renewal_date_for_all_active_subscribers(self, mass_extend_renewal_date_request: MassExtendRenewalDateRequest) -> MassExtendRenewalDateResponse: """ @@ -1000,7 +1000,7 @@ async def _make_request(self, path: str, method: str, queryParameters: Dict[str, return self._parse_response(response.status_code, response.headers, lambda: response.json(), destination_class) async def _execute_request(self, method: str, url: str, params: Dict[str, Union[str, List[str]]], headers: Dict[str, str], json: Optional[Dict[str, Any]], data: Optional[bytes]): - return await self.http_client.request(method, url, params=params, headers=headers, json=json, data=data) + return await self.http_client.request(method, url, params=params, headers=headers, json=json, data=data, timeout=30) async def extend_renewal_date_for_all_active_subscribers(self, mass_extend_renewal_date_request: MassExtendRenewalDateRequest) -> MassExtendRenewalDateResponse: """