Skip to content

Commit 33ff2f5

Browse files
committed
lint
1 parent d6833d6 commit 33ff2f5

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

Coder Desktop/VPN/Manager.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ actor Manager {
3131
// The tunnel might be asked to start before the network interfaces have woken up from sleep
3232
sessionConfig.waitsForConnectivity = true
3333
// URLSession's waiting for connectivity sometimes hangs even when
34-
// the network is up so this is deliberately short (15s) to avoid a
34+
// the network is up so this is deliberately short (30s) to avoid a
3535
// poor UX where it appears stuck.
36-
sessionConfig.timeoutIntervalForResource = 15
36+
sessionConfig.timeoutIntervalForResource = 30
3737
try await download(src: dylibPath, dest: dest, urlSession: URLSession(configuration: sessionConfig))
3838
} catch {
3939
throw .download(error)

Coder Desktop/VPNLib/Download.swift

+5-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ public enum ValidationError: Error {
3131
case .missingInfoPList:
3232
"Info.plist is not embedded within the dylib."
3333
case .belowMinimumCoderVersion:
34-
"The Coder deployment must be version \(SignatureValidator.minimumCoderVersion) or higher to use Coder Desktop."
34+
"""
35+
The Coder deployment must be version \(SignatureValidator.minimumCoderVersion)
36+
or higher to use Coder Desktop.
37+
"""
3538
}
3639
}
3740

@@ -53,6 +56,7 @@ public class SignatureValidator {
5356
private static let signInfoFlags: SecCSFlags = .init(rawValue: kSecCSSigningInformation)
5457

5558
// `expectedVersion` must be of the form `[0-9]+.[0-9]+.[0-9]+`
59+
// swiftlint:disable:next cyclomatic_complexity
5660
public static func validate(path: URL, expectedVersion: String) throws(ValidationError) {
5761
guard FileManager.default.fileExists(atPath: path.path) else {
5862
throw .fileNotFound

0 commit comments

Comments
 (0)