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
Add HTTP/2 PING keepalive support to prevent idle connection timeouts
Many cloud load balancers and proxies (e.g. AWS Global Accelerator)
terminate idle TCP connections after a fixed timeout (often 340s).
HTTP/2 PING frames (RFC 9113 §6.7) reset this idle timer, but
httpcore does not currently send them.
This adds a background thread that sends periodic HTTP/2 PING frames
on active connections, configurable via:
- `h2_ping_interval` parameter on ConnectionPool / HTTPConnection
- `HTTPCORE_H2_PING_INTERVAL` environment variable (seconds)
The env var allows enabling PING keepalive without any code changes,
which is critical for users of higher-level clients like httpx and
the OpenAI Python SDK that don't expose httpcore internals.
Closes#1080
Made-with: Cursor
0 commit comments