mirror of
https://github.com/apple/swift-nio-http2
synced 2026-11-22 04:30:43 +00:00
### Motivation `NIOHTTP2ServerConnectionManagementHandler` was derived from the implementation in [`gRPC-swift-nio-transport`](https://github.com/grpc/grpc-swift-nio-transport/blob/main/Sources/GRPCNIOTransportCore/Server/Connection/ServerConnectionManagementHandler.swift). In that implementation, PR https://github.com/grpc/grpc-swift-nio-transport/pull/183 updated the way how the channel is closed. The channel is now first half-closed and then fully-closed in order to allow all pending writes to drain. This is also applicable in this implementation, so we should apply the same change here. ### Modifications Applied the changes verbatim from PR https://github.com/grpc/grpc-swift-nio-transport/pull/183. ### Result Pending writes are drained when gracefully shutting down.