You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by "He-Pin (via GitHub)" <gi...@apache.org> on 2026/07/11 07:22:33 UTC
[PR] Fix deferred TLS output handling on inbound close [pekko]
He-Pin opened a new pull request, #3324:
URL: https://github.com/apache/pekko/pull/3324
### Motivation
`TlsGraphStage` migrated the TLS pump phases from `TlsActor` but also added deferred plaintext batching and deferred transport flushing. When transport input completes before either timer runs, the copied close transition can enter a non-executable `FlushingOutboundPhase` or complete before buffered ciphertext is emitted.
### Modification
Flush buffered transport output before selecting the close phase, and use the `SSLEngine`'s `NEED_WRAP` state to decide whether protocol output still has to be generated. Add deterministic tests that hold zero-delay timers and cover pending plaintext, buffered ciphertext, and engine wrap output.
### Result
Inbound close no longer strands the stage, already-wrapped ciphertext is delivered before completion, and pending engine output is wrapped before shutdown.
### Tests
- `stream-tests / Test / testOnly org.apache.pekko.stream.io.TlsGraphStageDeferredCloseSpec` (3 passed)
- `stream-tests / Test / testOnly org.apache.pekko.stream.io.TlsGraphStageIsolatedSpec` (7 passed)
- `scalafmt --list --mode diff-ref=origin/main`
- `headerCreateAll` and `+headerCheckAll`
- `git diff --check`
- Full test suite not run; focused validation only as requested.
### References
Refs #2860
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] Fix deferred TLS output handling on inbound close [pekko]
Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin merged PR #3324:
URL: https://github.com/apache/pekko/pull/3324
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org