From: Tom Christie Date: Fri, 29 May 2020 10:10:36 +0000 (+0100) Subject: Include missing keepalive_expiry configuration (#1005) X-Git-Tag: 0.13.3~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e1a56f99b2af8b017f4995f3a0c8bf2ae558e1d;p=thirdparty%2Fhttpx.git Include missing keepalive_expiry configuration (#1005) --- diff --git a/httpx/_client.py b/httpx/_client.py index 2c56edc5..748c3b65 100644 --- a/httpx/_client.py +++ b/httpx/_client.py @@ -46,6 +46,8 @@ from ._utils import ( logger = get_logger(__name__) +KEEPALIVE_EXPIRY = 5.0 + class BaseClient: def __init__( @@ -517,6 +519,7 @@ class Client(BaseClient): ssl_context=ssl_context, max_keepalive=pool_limits.max_keepalive, max_connections=pool_limits.max_connections, + keepalive_expiry=KEEPALIVE_EXPIRY, http2=http2, ) @@ -540,6 +543,7 @@ class Client(BaseClient): ssl_context=ssl_context, max_keepalive=pool_limits.max_keepalive, max_connections=pool_limits.max_connections, + keepalive_expiry=KEEPALIVE_EXPIRY, http2=http2, ) @@ -1062,6 +1066,7 @@ class AsyncClient(BaseClient): ssl_context=ssl_context, max_keepalive=pool_limits.max_keepalive, max_connections=pool_limits.max_connections, + keepalive_expiry=KEEPALIVE_EXPIRY, http2=http2, ) @@ -1085,6 +1090,7 @@ class AsyncClient(BaseClient): ssl_context=ssl_context, max_keepalive=pool_limits.max_keepalive, max_connections=pool_limits.max_connections, + keepalive_expiry=KEEPALIVE_EXPIRY, http2=http2, )