Files
swift-nio-http2/Sources/NIOHTTP2
Cory Benfield 8dcda68288 Ensure that we fire channelActive and channelInactive in order (#373)
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:

- Added a state enum to keep track of the state we're in
- Use that state enum to ensure we deliver active/inactive in the right
  order
- Additionally police other unexpected active/inactive behaviours

Result:

We'll appropriately police the state.
2023-02-15 15:52:34 +00:00
..