MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / _set_keepalive_times

Function _set_keepalive_times

pymongo/pool_shared.py:97–101  ·  view source on GitHub ↗
(sock)

Source from the content-addressed store, hash-verified

95 _WINDOWS_TCP_INTERVAL_MS = 1000
96
97 def _set_keepalive_times(sock):
98 idle_ms = min(_WINDOWS_TCP_IDLE_MS, _MAX_TCP_KEEPIDLE * 1000)
99 interval_ms = min(_WINDOWS_TCP_INTERVAL_MS, _MAX_TCP_KEEPINTVL * 1000)
100 if idle_ms < _WINDOWS_TCP_IDLE_MS or interval_ms < _WINDOWS_TCP_INTERVAL_MS:
101 sock.ioctl(socket.SIO_KEEPALIVE_VALS, (1, idle_ms, interval_ms))
102
103else:
104

Callers 2

_async_create_connectionFunction · 0.85
_create_connectionFunction · 0.85

Calls 1

_set_tcp_optionFunction · 0.85

Tested by

no test coverage detected