Files
swift-nio-http2/Tests
Rick Newton-RogersandCory Benfield 69e838fb22 Remove precondition: yielding to terminated AsyncSequence (#432)
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>
2023-12-20 14:57:41 +00:00
..