apple / swift-nio-http2

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

Ensure that we fire channelActive and channelInactive in order #373

Closed Lukasa closed 1 year ago

Lukasa commented 1 year ago

Motivation:

channelActive must always precede channelInactive. Unfortunately, this isn't guaranteed right now: if we happen to get channelInactive as a result of our writing the preamble we'll fire them in the wrong order. Many systems can tolerate this, but we should avoid doing this anyway.

Modifications:

Result:

We'll appropriately police the state.