Skip to content

fix: preserve Client sends after peer write EOF - #9

Merged
kentbull merged 1 commit into
release/v0.6.20from
p0/client-transmit-state-v0.6.20
Aug 27, 2026
Merged

kentbull merged 1 commit into
release/v0.6.20from
p0/client-transmit-state-v0.6.20

Conversation

@kentbull

@kentbull kentbull commented Aug 27, 2026 •

Copy link
Copy Markdown
Collaborator

What

  • Track Client receive and transmit terminal state independently.
  • Retain terminal send causes and unsent bytes.
  • Reject output after transmit closure.
  • Reset terminal facts only for a newly allocated socket.

Why

Local receive EOF caused by peer write shutdown is directional and must not suppress Client transmission. Conversely, a terminal send failure must stop impossible retries without deleting accepted output or final peer input.

Boundary

This PR changes raw Client state and enqueue behavior only. It does not change Remoter, TLS classification, connection-wide Client send classification, or graceful shutdown.

Separate receive EOF from terminal transmit state so accepted output can still drain, while broken sends retain their cause and queued bytes. Reject later enqueue attempts and reset these facts only after allocating a new socket.

This intentionally leaves local shutdown bookkeeping and all TLS behavior for follow-up PRs.
@kentbull
kentbull merged commit ed90ee9 into release/v0.6.20 Aug 27, 2026
6 checks passed
@kentbull
kentbull deleted the p0/client-transmit-state-v0.6.20 branch August 27, 2026 10:22
@kentbull

kentbull commented Aug 28, 2026 •

Copy link
Copy Markdown
Collaborator Author

Upstream dependency: this is the first Client-side directional-state change in #9–#17. It introduces Client.txCutoff, retained terminal causes, and TransmitClosedError; ioflo#163 currently proposes only the corresponding Remoter-side foundation.

This behavior must be adapted to the directional-state abstraction accepted on current upstream main; it is not a clean cherry-pick.

@kentbull

kentbull commented Aug 28, 2026 •

Copy link
Copy Markdown
Collaborator Author

Implements downstream behavior for ioflo#171.

The fork Client can preserve and send output after local receive EOF caused by peer write shutdown. #16 adds the corresponding real-socket regression coverage.

@kentbull

kentbull commented Aug 28, 2026 •

Copy link
Copy Markdown
Collaborator Author

Partially implements the Client portion of ioflo#172 by retaining terminal send causes and unsent bytes and rejecting later output after transmit closure.

Connection-wide Client send errors in this PR still close only transmit, so the complete upstream contract remains open. #10 implements the corresponding Remoter behavior.

@kentbull kentbull changed the title fix: preserve Client output after receive EOF fix: preserve Client sends after peer write EOF Aug 29, 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.

1 participant