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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
