Tweak advanced timeouts docs (#1420)

This commit is contained in:
Florimond Manca 2020-12-08 14:31:00 +01:00 committed by GitHub
parent 7ea6019c70
commit 584a40513f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -633,7 +633,7 @@ There are four different types of timeouts that may occur. These are **connect**
**read**, **write**, and **pool** timeouts.
* The **connect** timeout specifies the maximum amount of time to wait until
a connection to the requested host is established. If HTTPX is unable to connect
a socket connection to the requested host is established. If HTTPX is unable to connect
within this time frame, a `ConnectTimeout` exception is raised.
* The **read** timeout specifies the maximum duration to wait for a chunk of
data to be received (for example, a chunk of the response body). If HTTPX is
@ -645,7 +645,7 @@ to send data within this time frame, a `WriteTimeout` exception is raised.
a connection from the connection pool. If HTTPX is unable to acquire a connection
within this time frame, a `PoolTimeout` exception is raised. A related
configuration here is the maximum number of allowable connections in the
connection pool, which is configured by the `pool_limits`.
connection pool, which is configured by the `limits` argument.
You can configure the timeout behavior for any of these values...
@ -667,7 +667,6 @@ allow. (Defaults 10)
- `max_connections`, maximum number of allowable connections, or` None` for no limits.
(Default 100)
```python
limits = httpx.Limits(max_keepalive_connections=5, max_connections=10)
client = httpx.Client(limits=limits)