From 79d7e398c190d0d26c8bb04c39f7b4bfd0bc7909 Mon Sep 17 00:00:00 2001 From: Danny Canter Date: Thu, 20 Nov 2025 12:00:56 -0800 Subject: [PATCH] vminitd client: Remove connection backoff (#423) For the constructor we're using where we pass an already connected socket, I'm not sure this even does anything, and if it does that's a bug I'd rather just avoid altogether. Also gets rid of the unused constructor we have to pass in a UDS. --- Sources/Containerization/Vminitd.swift | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/Sources/Containerization/Vminitd.swift b/Sources/Containerization/Vminitd.swift index 07f32fe9..c142e93f 100644 --- a/Sources/Containerization/Vminitd.swift +++ b/Sources/Containerization/Vminitd.swift @@ -438,25 +438,13 @@ extension Hosts { } extension Vminitd.Client { - public init(socket: String, group: EventLoopGroup) { - var config = ClientConnection.Configuration.default( - target: .unixDomainSocket(socket), - eventLoopGroup: group - ) - config.maximumReceiveMessageLength = Int(64.mib()) - config.connectionBackoff = ConnectionBackoff(retries: .upTo(5)) - - self = .init(channel: ClientConnection(configuration: config)) - } - public init(connection: FileHandle, group: EventLoopGroup) { var config = ClientConnection.Configuration.default( target: .connectedSocket(connection.fileDescriptor), eventLoopGroup: group ) + config.connectionBackoff = nil config.maximumReceiveMessageLength = Int(64.mib()) - config.connectionBackoff = ConnectionBackoff(retries: .upTo(5)) - self = .init(channel: ClientConnection(configuration: config)) }