Skip to content

Commit 3a7f846

Browse files
committed
Make socket connect and read timeouts consistent between sync and async clients
1 parent cd4b67b commit 3a7f846

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

indico/http/client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ def _make_request(
177177
f"{self.base_url}{path}",
178178
headers=headers,
179179
stream=True,
180+
timeout=(4, 64),
180181
verify=False
181182
if not self.config.verify_ssl or not self.request_session.verify
182183
else True,
@@ -361,6 +362,7 @@ async def _make_request(
361362
async with getattr(self.request_session, method)(
362363
f"{self.base_url}{path}",
363364
headers=headers,
365+
timeout=aiohttp.ClientTimeout(sock_connect=4, sock_read=64),
364366
verify_ssl=self.config.verify_ssl,
365367
**request_kwargs,
366368
) as response:

0 commit comments

Comments
 (0)