From: Udasi Tharani <56196911+udasitharani@users.noreply.github.com> Date: Tue, 22 Feb 2022 10:40:14 +0000 (+0530) Subject: adding keepalive_expiry param to docs and docstring (#2090) X-Git-Tag: 0.23.0~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a08edc4714ea18f8bda893dc7c723972af58bd6;p=thirdparty%2Fhttpx.git adding keepalive_expiry param to docs and docstring (#2090) --- diff --git a/docs/advanced.md b/docs/advanced.md index 631cc463..8306d443 100644 --- a/docs/advanced.md +++ b/docs/advanced.md @@ -672,8 +672,9 @@ argument on the client. It takes instances of `httpx.Limits` which define: - `max_keepalive`, number of allowable keep-alive connections, or `None` to always allow. (Defaults 20) -- `max_connections`, maximum number of allowable connections, or` None` for no limits. +- `max_connections`, maximum number of allowable connections, or `None` for no limits. (Default 100) +- `keepalive_expiry`, time limit on idle keep-alive connections in seconds, or `None` for no limits. (Default 5) ```python limits = httpx.Limits(max_keepalive_connections=5, max_connections=10) diff --git a/httpx/_config.py b/httpx/_config.py index 9cf6d167..ca07ea45 100644 --- a/httpx/_config.py +++ b/httpx/_config.py @@ -284,6 +284,7 @@ class Limits: * **max_keepalive_connections** - Allow the connection pool to maintain keep-alive connections below this point. Should be less than or equal to `max_connections`. + * **keepalive_expiry** - Time limit on idle keep-alive connections in seconds. """ def __init__(