]> git.ipfire.org Git - thirdparty/httpx.git/commitdiff
adding keepalive_expiry param to docs and docstring (#2090)
authorUdasi Tharani <56196911+udasitharani@users.noreply.github.com>
Tue, 22 Feb 2022 10:40:14 +0000 (16:10 +0530)
committerGitHub <noreply@github.com>
Tue, 22 Feb 2022 10:40:14 +0000 (10:40 +0000)
docs/advanced.md
httpx/_config.py

index 631cc4634de68a4607380e6d8251ff0faca3c09a..8306d4433f24931dda454b2303dd4f60a4bab7f1 100644 (file)
@@ -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, orNone` 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)
index 9cf6d1677753e2398886c63d7e94a01fae3f22c0..ca07ea45b5a3e748e51da8b22cf5e53f1501b34a 100644 (file)
@@ -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__(