Skip to content

Commit cddc2f6

Browse files
Add timeout to AppStoreServerAPIClient
1 parent 93118ad commit cddc2f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

appstoreserverlibrary/api_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ def _make_request(self, path: str, method: str, queryParameters: Dict[str, Union
682682
return self._parse_response(response.status_code, response.headers, lambda: response.json(), destination_class)
683683

684684
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:
685-
return requests.request(method, url, params=params, headers=headers, json=json, data=data)
685+
return requests.request(method, url, params=params, headers=headers, json=json, data=data, timeout=30)
686686

687687
def extend_renewal_date_for_all_active_subscribers(self, mass_extend_renewal_date_request: MassExtendRenewalDateRequest) -> MassExtendRenewalDateResponse:
688688
"""
@@ -1000,7 +1000,7 @@ async def _make_request(self, path: str, method: str, queryParameters: Dict[str,
10001000
return self._parse_response(response.status_code, response.headers, lambda: response.json(), destination_class)
10011001

10021002
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]):
1003-
return await self.http_client.request(method, url, params=params, headers=headers, json=json, data=data)
1003+
return await self.http_client.request(method, url, params=params, headers=headers, json=json, data=data, timeout=30)
10041004

10051005
async def extend_renewal_date_for_all_active_subscribers(self, mass_extend_renewal_date_request: MassExtendRenewalDateRequest) -> MassExtendRenewalDateResponse:
10061006
"""

0 commit comments

Comments
 (0)