swift-nio-http2 icon indicating copy to clipboard operation
swift-nio-http2 copied to clipboard

`NIOHTTP2Handler` should handle `ChannelShouldQuiesceEvent`

Open fabianfett opened this issue 3 years ago • 2 comments
trafficstars

SwiftNIOExtras offers a QuiescingHelper to gracefully shutdown servers. NIOHTTP2Handler should support shutting down a server connection, when the QuiescingHelper sends out a ChannelShouldQuiesceEvent:

  • Once NIOHTTP2Handler receives a ChannelShouldQuiesceEvent a GoAway frame should be send to the client and new incoming streams should be rejected.
  • Once all previously open streams have finished the connection should be closed.

In NIOHTTP1 the ChannelShouldQuiesceEvent support is implemented in HTTPServerPipelineHandler

fabianfett avatar Apr 11 '22 11:04 fabianfett

Hmm maybe this is why I was having issues performing a soft-restart of a HTTP/2 Vapor server. I remember seeing quiesce/shutdown errors.

lmcd avatar May 26 '22 16:05 lmcd