Skip to content

Fix send() return value checks in negotiation code paths#32

Merged
SeanTAllen merged 2 commits intomainfrom
fix-negotiation-send-checks
Feb 23, 2026
Merged

Fix send() return value checks in negotiation code paths#32
SeanTAllen merged 2 commits intomainfrom
fix-negotiation-send-checks

Conversation

@SeanTAllen
Copy link
Copy Markdown
Member

The HELLO and AUTH sends during connection negotiation didn't check the send() return value. If send() returned an error, the negotiation command was silently lost and the session would hang forever waiting for a response that would never arrive.

Each site is reordered so send() happens before the state transition. Only transition on successful send. On failure, shut down the session cleanly.

Closes #30

The HELLO and AUTH sends during connection negotiation didn't check the
send() return value. If send() returned an error, the negotiation
command was silently lost and the session would hang forever waiting
for a response that would never arrive.

Reorder each site so the send() happens before the state transition.
Only transition on successful send. On failure, shut down the session
cleanly.

Closes #30
@SeanTAllen SeanTAllen added the changelog - fixed Automatically add "Fixed" CHANGELOG entry on merge label Feb 23, 2026
@ponylang-main ponylang-main added the discuss during sync Should be discussed during an upcoming sync label Feb 23, 2026
@SeanTAllen SeanTAllen removed the changelog - fixed Automatically add "Fixed" CHANGELOG entry on merge label Feb 23, 2026
Project has not been released yet — no release notes needed.
@SeanTAllen SeanTAllen merged commit 823d1c1 into main Feb 23, 2026
5 of 6 checks passed
@SeanTAllen SeanTAllen deleted the fix-negotiation-send-checks branch February 23, 2026 15:23
@ponylang-main ponylang-main removed the discuss during sync Should be discussed during an upcoming sync label Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pre-ready state sends don't check send() return value

2 participants