Solve Windows issues

This commit is contained in:
Adrian Chaves 2026-08-07 19:46:18 +02:00
parent 1b937b32a2
commit b769704a85
1 changed files with 6 additions and 2 deletions

View File

@ -95,8 +95,12 @@ class HttpxDownloadHandler(_Base):
# hard limit on simultaneous connections (None for no limit, which
# is what a CONCURRENT_CONNECTIONS_PER_HANDLER of 0 means)
max_connections=self._pool_size_total or None,
# total number of idle connections in the pool (extra ones are closed)
max_keepalive_connections=self._pool_size_total or None,
# total number of idle connections in the pool (extra ones are
# closed); keeping none of them is how keepalive gets disabled,
# since expiry alone is subject to the resolution of the clock
max_keepalive_connections=(
(self._pool_size_total or None) if self._keepalive_timeout else 0
),
keepalive_expiry=self._keepalive_timeout,
)