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

Handle race condition between sending GOAWAY and HEADERS #457

Closed clintonpi closed 2 weeks ago

clintonpi commented 3 weeks ago

Motivation:

A potential race exists between a server sending a GOAWAY frame and a client opening a new stream (i.e., sending a HEADERS frame before receiving an already sent GOAWAY frame). If there are no open streams when the server sends the GOAWAY frame, the connection state on the server transitions to being fully quiesced, which throws a connection error on receipt of a HEADERS frame.

Modifications:

Result:

This condition will be treated as a stream-level error instead.