Skip to content

Commit ea9e94c

Browse files
committed
Fix aiohttp timeout
1 parent d0e62da commit ea9e94c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bitcart/providers/jsonrpcrequests.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,9 @@ def __getattr__(self, method: str, *args: Any, **kwargs: Any) -> Callable:
117117
async def wrapper(*args: Any, **kwargs: Any) -> Any:
118118
try:
119119
async with self.session.post(
120-
self.url, data=json_encode(create_request(method, xpub=self.xpub, *args, **kwargs)), timeout=5 * 60
120+
self.url,
121+
data=json_encode(create_request(method, xpub=self.xpub, *args, **kwargs)),
122+
timeout=aiohttp.ClientTimeout(total=5 * 60),
121123
) as response:
122124
parsed = parse_json(await response.text())
123125
if isinstance(parsed, Ok):

0 commit comments

Comments
 (0)