diff --git a/Sources/HummingbirdCore/Server/HTTP/HTTP1Channel.swift b/Sources/HummingbirdCore/Server/HTTP/HTTP1Channel.swift index 1607876c..63d5271f 100644 --- a/Sources/HummingbirdCore/Server/HTTP/HTTP1Channel.swift +++ b/Sources/HummingbirdCore/Server/HTTP/HTTP1Channel.swift @@ -24,7 +24,7 @@ public struct HTTP1Channel: ServerChildChannel, HTTPChannelHandler { /// HTTP1Channel configuration public struct Configuration: Sendable { - /// Additional channel handlers to add to channel after HTTP part decoding and before HTTP request processing + /// Additional channel handlers to add to channel pipeline after HTTP part decoding and before HTTP request handling public var additionalChannelHandlers: @Sendable () -> [any RemovableChannelHandler] /// Time before closing an idle channel public var idleTimeout: TimeAmount? diff --git a/Sources/HummingbirdHTTP2/HTTP2ServerConnectionManager+StateMachine.swift b/Sources/HummingbirdHTTP2/HTTP2ServerConnectionManager+StateMachine.swift index 655ed285..6268b5c7 100644 --- a/Sources/HummingbirdHTTP2/HTTP2ServerConnectionManager+StateMachine.swift +++ b/Sources/HummingbirdHTTP2/HTTP2ServerConnectionManager+StateMachine.swift @@ -162,10 +162,12 @@ extension HTTP2ServerConnectionManager { mutating func inputClosed() -> InputClosedResult { switch self.state { case .active(let activeState): + self.state = .closed return .closeWithGoAway(lastStreamId: activeState.lastStreamId) case .closing(let closeState): if closeState.sentSecondGoAway { + self.state = .closed return .close } else { return .closeWithGoAway(lastStreamId: closeState.lastStreamId)