Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions conjure_python_client/_http/requests_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import random
import requests
import socket
import sys
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was unused



T = TypeVar("T")
Expand Down Expand Up @@ -55,13 +54,15 @@
socket.SO_KEEPALIVE,
1,
) # Enable keep alive.
SOCKET_KEEP_INTVL = (
socket.SOL_TCP,
socket.TCP_KEEPINTVL,
120,
) # Interval of 120s between individual keepalive probes.
KEEP_ALIVE_SOCKET_OPTIONS = [SOCKET_KEEP_ALIVE, SOCKET_KEEP_INTVL]
if sys.platform != "darwin":
KEEP_ALIVE_SOCKET_OPTIONS = [SOCKET_KEEP_ALIVE]
if hasattr(socket, "TCP_KEEPINTVL"):
SOCKET_KEEP_INTVL = (
socket.SOL_TCP,
socket.TCP_KEEPINTVL,
120,
) # Interval of 120s between individual keepalive probes.
KEEP_ALIVE_SOCKET_OPTIONS.append(SOCKET_KEEP_INTVL)
if hasattr(socket, "TCP_KEEPIDLE"):
SOCKET_KEEP_IDLE = (
socket.SOL_TCP,
socket.TCP_KEEPIDLE,
Expand Down