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.
This commit is contained in:
Danny Canter
2025-11-20 12:00:56 -08:00
committed by GitHub
parent f31d2005b5
commit 79d7e398c1
+1 -13
View File
@@ -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))
}