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

Soften errors when seeing inactive before active #376

Closed Lukasa closed 1 year ago

Lukasa commented 1 year ago

Motivation:

When we started checking active/inactive ordering, we added code that rejected some channel pipeline state transitions. That code was too strict: it is absolutely possible to see channelInactive before channelActive in well-functioning programs.

We'll still call this an error, but we don't need to crash in debug mode when we see it.

Modifications:

Result:

More reliable code

Resolves #375