Skip to content

Commit

Permalink
concurrency warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
rnro committed Aug 17, 2023
1 parent b041e8f commit 69f8db9
Show file tree
Hide file tree
Showing 5 changed files with 205 additions and 152 deletions.
2 changes: 1 addition & 1 deletion Sources/NIOHTTP2/HTTP2StreamMultiplexer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ extension HTTP2StreamMultiplexer {
/// failed if an error occurs.
/// - streamStateInitializer: A callback that will be invoked to allow you to configure the
/// `ChannelPipeline` for the newly created channel.
public func createStreamChannel(promise: EventLoopPromise<Channel>?, _ streamStateInitializer: @escaping (Channel) -> EventLoopFuture<Void>) {
public func createStreamChannel(promise: EventLoopPromise<Channel>?, _ streamStateInitializer: @escaping NIOChannelInitializer) {
self.commonStreamMultiplexer.createStreamChannel(multiplexer: .legacy(LegacyOutboundStreamMultiplexer(multiplexer: self)), promise: promise, streamStateInitializer)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func setupServer(group: EventLoopGroup) throws -> Channel {

func sendOneRequest(channel: Channel, multiplexer: HTTP2StreamMultiplexer) throws -> Int {
let responseReceivedPromise = channel.eventLoop.makePromise(of: Int.self)
func requestStreamInitializer(channel: Channel) -> EventLoopFuture<Void> {
let requestStreamInitializer: NIOChannelInitializer = { channel in
return channel.pipeline.addHandlers([HTTP2FramePayloadToHTTP1ClientCodec(httpProtocol: .https),
SendRequestHandler(host: "127.0.0.1",
request: .init(version: .init(major: 2, minor: 0),
Expand Down

0 comments on commit 69f8db9

Please sign in to comment.