Skip to content

Commit 79d7e39

Browse files
authored
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.
1 parent f31d200 commit 79d7e39

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

Sources/Containerization/Vminitd.swift

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -438,25 +438,13 @@ extension Hosts {
438438
}
439439

440440
extension Vminitd.Client {
441-
public init(socket: String, group: EventLoopGroup) {
442-
var config = ClientConnection.Configuration.default(
443-
target: .unixDomainSocket(socket),
444-
eventLoopGroup: group
445-
)
446-
config.maximumReceiveMessageLength = Int(64.mib())
447-
config.connectionBackoff = ConnectionBackoff(retries: .upTo(5))
448-
449-
self = .init(channel: ClientConnection(configuration: config))
450-
}
451-
452441
public init(connection: FileHandle, group: EventLoopGroup) {
453442
var config = ClientConnection.Configuration.default(
454443
target: .connectedSocket(connection.fileDescriptor),
455444
eventLoopGroup: group
456445
)
446+
config.connectionBackoff = nil
457447
config.maximumReceiveMessageLength = Int(64.mib())
458-
config.connectionBackoff = ConnectionBackoff(retries: .upTo(5))
459-
460448
self = .init(channel: ClientConnection(configuration: config))
461449
}
462450

0 commit comments

Comments
 (0)