From d91159fb37ca3b39feac1ad9cb67ac95c2c2baf3 Mon Sep 17 00:00:00 2001 From: imSp4rky Date: Fri, 7 Aug 2026 11:36:31 -0600 Subject: [PATCH] docs(session): correct stale pool-size comment pool_max_idle_per_host no longer matches the downloader worker cap; POOL_MAX_SIZE was deliberately raised above it so hedge racers and tail-boost parts do not park threads under pool_block=True. Point the comment at the constant so the value is not reverted to the worker cap. --- unshackle/core/session.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/unshackle/core/session.py b/unshackle/core/session.py index 798a5e98..077dab77 100644 --- a/unshackle/core/session.py +++ b/unshackle/core/session.py @@ -839,8 +839,9 @@ def session( # Connection-pool / timeout defaults applied only when neither config.network nor the caller set them. # connect_timeout + read_timeout mirror the requests-path default timeout (CONNECT_TIMEOUT, READ_TIMEOUT) # so an unset config still gets a bounded connect and read like requests; pool_idle_timeout stays under - # the typical ~60s CDN idle kill; pool_max_idle_per_host matches the downloader worker cap to avoid - # HTTP/1.1 connection churn; tcp_keepalive keeps long idle segments warm. + # the typical ~60s CDN idle kill; pool_max_idle_per_host follows POOL_MAX_SIZE, sized above the worker + # cap because hedge racers and tail-boost parts push in-flight requests past it (see POOL_MAX_SIZE); + # tcp_keepalive keeps long idle segments warm. session_kwargs.setdefault("connect_timeout", CONNECT_TIMEOUT) session_kwargs.setdefault("read_timeout", READ_TIMEOUT) session_kwargs.setdefault("pool_idle_timeout", 55)