Skip to content

Commit

Permalink
Fix aiohttp timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
MrNaif2018 committed Aug 27, 2024
1 parent d0e62da commit ea9e94c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bitcart/providers/jsonrpcrequests.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ def __getattr__(self, method: str, *args: Any, **kwargs: Any) -> Callable:
async def wrapper(*args: Any, **kwargs: Any) -> Any:
try:
async with self.session.post(
self.url, data=json_encode(create_request(method, xpub=self.xpub, *args, **kwargs)), timeout=5 * 60
self.url,
data=json_encode(create_request(method, xpub=self.xpub, *args, **kwargs)),
timeout=aiohttp.ClientTimeout(total=5 * 60),
) as response:
parsed = parse_json(await response.text())
if isinstance(parsed, Ok):
Expand Down

0 comments on commit ea9e94c

Please sign in to comment.