Skip to content

Commit 833b07f

Browse files
authored
vminitd (client): Turn off idle timeout (#680)
Closes: #678 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 833b07f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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)