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

use synchronous H2 multiplexer accessor #396

Closed rnro closed 1 year ago

rnro commented 1 year ago

Motivation:

The ChannelPipeline.SynchronousOperations.configureHTTP2Pipeline(...) method added to support synchronously setting up a pipeline to handle HTTP2 with the StreamMultiplexer embedded within the NIOHTTP2Handler erroneously retrieved the multiplexer via a .wait(). This is not permitted and will cause any code which executes it to deadlock.

Modifications:

The synchrounous operation now obtains the multiplexer via handler.syncMultiplexer()

Result:

The code should not deadlock.

Lukasa commented 1 year ago

Gotta fix the allocation counts!