Skip to content

Commit ca827a3

Browse files
committed
vminitd: Turn off idle timeout
There's no reason to have an idle timeout per connection as users may use this library in many different ways. The grpc lib defaults to a 30 min idle timeout which could be trivially reached if instead of waiting on the init process, you were waiting on a bunch of execs. NIO under the hood asserts on ebadfs (which is good, but bad for this scenario..), so lets turn off the timeout altogether.
1 parent 9d87045 commit ca827a3

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Sources/Containerization/Vminitd.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ public struct Vminitd: Sendable {
108108
.withConnectedSocket(connection.fileDescriptor).wait()
109109
let transport = HTTP2ClientTransport.WrappedChannel.wrapping(
110110
channel: channel,
111+
config: .defaults { $0.connection.maxIdleTime = nil }
111112
)
112113
let grpcClient = GRPCClient(transport: transport)
113114
self.grpcClient = grpcClient

0 commit comments

Comments
 (0)