mirror of
https://github.com/apple/swift-nio-http2
synced 2026-11-24 04:38:00 +00:00
Motivation: If a task iterating over inbound streams using the new async API is cancelled then it can lead to the process crashing as we hit a precondition which guards against yielding to a terminated NIOHTTP2AsyncSequence. Modifications: Remove the precondition. Result: The code no longer crashes, instead it silently drops the yielded value. Doing more than this such as closing the connection requires rethinking more of the API. --------- Co-authored-by: Cory Benfield <lukasa@apple.com>