mirror of
https://github.com/apple/swift-nio-http2
synced 2026-11-29 05:24:22 +00:00
use synchronous H2 multiplexer accessor (#396)
* use synchronous H2 multiplexer accessor 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. * update allocation counts
This commit is contained in:
1 parent
f509541022
commit
fc2e98ecad
6 files changed
+21
-21
No files matched your search
@@ -375,6 +375,6 @@ extension ChannelPipeline.SynchronousOperations {
|
||||
try self.addHandler(handler, position: position)
|
||||
|
||||
// `multiplexer` will always be non-nil when we are initializing with an `inboundStreamInitializer`
|
||||
return try handler.multiplexer.wait()
|
||||
return try handler.syncMultiplexer()
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user