apple / swift-nio-http2

HTTP/2 support for SwiftNIO
https://swiftpackageindex.com/apple/swift-nio-http2/main/documentation/niohttp2
Apache License 2.0
462 stars 82 forks source link

Delay stream creation until the next loop tick #416

Closed glbrntt closed 1 year ago

glbrntt commented 1 year ago

Motivation:

A recent change allowed stream creation to run immediately if the caller was on the correct event loop. Normally that's fine, however, it opens up a code path where streams can become activated twice which leads to a crash.

Modifications:

Result:

Avoid re-entrantly activating streams twice.