Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre-emptively fix sendability issues with the next NIO release #26

Merged
merged 1 commit into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,12 @@ extension HTTP2ServerTransport {
let serverChannel = try await ServerBootstrap(group: eventLoopGroup)
.serverChannelOption(.socketOption(.so_reuseaddr), value: 1)
.serverChannelInitializer { channel in
let quiescingHandler = serverQuiescingHelper.makeServerChannelHandler(channel: channel)
return channel.pipeline.addHandler(quiescingHandler)
return channel.eventLoop.makeCompletedFuture {
let quiescingHandler = serverQuiescingHelper.makeServerChannelHandler(
channel: channel
)
return try channel.pipeline.syncOperations.addHandler(quiescingHandler)
}
}
.bind(to: address) { channel in
channel.eventLoop.makeCompletedFuture {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,12 @@ extension HTTP2ServerTransport {
try await bootstrap
.serverChannelOption(.socketOption(.so_reuseaddr), value: 1)
.serverChannelInitializer { channel in
let quiescingHandler = serverQuiescingHelper.makeServerChannelHandler(channel: channel)
return channel.pipeline.addHandler(quiescingHandler)
return channel.eventLoop.makeCompletedFuture {
let quiescingHandler = serverQuiescingHelper.makeServerChannelHandler(
channel: channel
)
return try channel.pipeline.syncOperations.addHandler(quiescingHandler)
}
}
.bind(to: address) { channel in
channel.eventLoop.makeCompletedFuture {
Expand Down
Loading