Skip to content

Add connection timeout#179

Merged
SeanTAllen merged 1 commit intomainfrom
connection-timeout
Mar 22, 2026
Merged

Add connection timeout#179
SeanTAllen merged 1 commit intomainfrom
connection-timeout

Conversation

@SeanTAllen
Copy link
Copy Markdown
Member

Thread lori's ConnectionTimeout through ServerConnectInfo to Session so users can bound the TCP connection phase. Without this, connections to unreachable hosts hang until the OS-level TCP timeout.

ServerConnectInfo gains an optional connection_timeout parameter (default None). When set, lori fires ConnectionFailedTimeout if TCP doesn't connect in time — the existing failure mapping (from PR #177) delivers it to pg_session_connection_failed.

_CancelSender does not use the connection timeout — cancel connections are fire-and-forget with no user callback, so a timeout would have no observable effect.

Design: #72

Thread lori's ConnectionTimeout through ServerConnectInfo to
Session so users can bound the TCP connection phase. Without this,
connections to unreachable hosts hang until the OS-level TCP timeout.

Design: #72
@SeanTAllen SeanTAllen added the changelog - added Automatically add "Added" CHANGELOG entry on merge label Mar 22, 2026
@ponylang-main ponylang-main added the discuss during sync Should be discussed during an upcoming sync label Mar 22, 2026
@SeanTAllen SeanTAllen merged commit 5fd7d64 into main Mar 22, 2026
9 checks passed
@SeanTAllen SeanTAllen deleted the connection-timeout branch March 22, 2026 21:08
@ponylang-main ponylang-main removed the discuss during sync Should be discussed during an upcoming sync label Mar 22, 2026
github-actions bot pushed a commit that referenced this pull request Mar 22, 2026
github-actions bot pushed a commit that referenced this pull request Mar 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog - added Automatically add "Added" CHANGELOG entry on merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants