Skip to content

fix: retain TLS output and causes after send failure - #12

Merged
kentbull merged 1 commit into
release/v0.6.20from
p0/tls-send-outcomes-v0.6.20
Aug 27, 2026
Merged

kentbull merged 1 commit into
release/v0.6.20from
p0/tls-send-outcomes-v0.6.20

Conversation

@kentbull

@kentbull kentbull commented Aug 27, 2026 •

Copy link
Copy Markdown
Collaborator

What

  • Retry typed TLS WANT conditions without changing terminal state.
  • Record broken pipe as transmit-only closure so receive can still drain.
  • Force-close both directions for fatal SSL and connection-wide socket failures.
  • Retain the original exception and every unsent byte on terminal paths.

Why

A nonblocking retry is not a failure, a broken write does not necessarily end receive, and an unusable TLS transport must not remain represented as open. Conflating those outcomes either loses accepted output or permits impossible retries.

Boundary

This PR classifies established-session TLS send outcomes only. It does not initiate close_notify or implement recurrent graceful shutdown.

Treat TLS WANT conditions as retryable, retain broken-pipe state without closing the receive direction, and force-close connection-wide SSL or socket failures. Every terminal path keeps the original cause and leaves unsent bytes queued.

This PR does not start graceful TLS shutdown; recurrent close remains a follow-up concern.
@kentbull
kentbull merged commit 964a134 into release/v0.6.20 Aug 27, 2026
6 checks passed
@kentbull
kentbull deleted the p0/tls-send-outcomes-v0.6.20 branch August 27, 2026 10:43
@kentbull

Copy link
Copy Markdown
Collaborator Author

Upstream prerequisites: the directional state and unsent-output contract from #9/#10, followed by the truthful TLS wrapping and receive-outcome classification from #11.

Only then can this send-side behavior classify WANT, broken pipe, fatal TLS, and connection-wide socket failures while retaining the original cause and unsent bytes.

@kentbull

kentbull commented Aug 28, 2026 •

Copy link
Copy Markdown
Collaborator Author

Implements downstream send-side behavior for ioflo#174 by separating retryable WANT conditions, broken pipe, fatal TLS errors, and connection-wide socket failures while retaining terminal causes and unsent plaintext. #16 expands regression coverage.

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