You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit changes the socket options of a connection in a way that
keepalive (socket.SO_KEEPALIVE) is enabled by default. If enabled, the
kernel settings can be overwritten by individual options. Setting the
socket options is still handled by urllib3.
Reference: https://urllib3.readthedocs.io/en/latest/reference/urllib3.connection.html#urllib3.connection.HTTPConnection
The new arguments for `crate.client.connect` and respectively
`crate.client.connection.Connection` are:
* `socket_keepalive`: (optional, defaults to ``True``)
Enable TCP keepalive on socket level.
* `socket_tcp_keepidle`: (optional)
Set the `TCP_KEEPIDLE` socket option, which overrides
`net.ipv4.tcp_keepalive_time` kernel setting if `socket_keepalive`
is `True`.
* `socket_tcp_keepintvl`: (optional)
Set the `TCP_KEEPINTVL` socket option, which overrides
`net.ipv4.tcp_keepalive_intvl` kernel setting if `socket_keepalive`
is `True`.
* `socket_tcp_keepcnt`: (optional)
Set the `TCP_KEEPCNT` socket option, which overrides
`net.ipv4.tcp_keepalive_probes` kernel setting if `socket_keepalive`
is `True`.
0 commit comments