diff --git a/Sources/ReplicantSwift/Async/PolishClientAsync.swift b/Sources/ReplicantSwift/Async/PolishClientAsync.swift index 34898fd..8c70cb0 100644 --- a/Sources/ReplicantSwift/Async/PolishClientAsync.swift +++ b/Sources/ReplicantSwift/Async/PolishClientAsync.swift @@ -18,7 +18,7 @@ extension PolishClientConfig: PolishAsync { public func polish(_ connection: TransmissionAsync.AsyncConnection, _ logger: Logger) async throws -> TransmissionAsync.AsyncConnection { - let config = ShadowConfig.ShadowClientConfig(serverAddress: self.serverAddress, serverPublicKey: self.serverPublicKey, mode: .DARKSTAR) + let config = try ShadowConfig.ShadowClientConfig(serverAddress: self.serverAddress, serverPublicKey: self.serverPublicKey, mode: .DARKSTAR) return try await AsyncDarkstarClientConnection(connection, config, logger) } } diff --git a/Sources/ReplicantSwift/Polish/PolishClientConfig.swift b/Sources/ReplicantSwift/Polish/PolishClientConfig.swift index 36c92e9..c25f3c3 100644 --- a/Sources/ReplicantSwift/Polish/PolishClientConfig.swift +++ b/Sources/ReplicantSwift/Polish/PolishClientConfig.swift @@ -46,7 +46,7 @@ extension PolishClientConfig: PolishConfig } let endpoint = NWEndpoint.hostPort(host: NWEndpoint.Host.ipv4(ipv4), port: NWEndpoint.Port(integerLiteral: port)) - let config = ShadowConfig.ShadowClientConfig(serverAddress: self.serverAddress, serverPublicKey: self.serverPublicKey, mode: .DARKSTAR) + let config = try ShadowConfig.ShadowClientConfig(serverAddress: self.serverAddress, serverPublicKey: self.serverPublicKey, mode: .DARKSTAR) guard let result = DarkStarClientConnection(connection: connection, endpoint: endpoint, parameters: .tcp, config: config, logger: logger) else { throw PolishClientConfigError.nullDarkStarConnection diff --git a/Sources/ReplicantSwift/Polish/PolishServerConfig.swift b/Sources/ReplicantSwift/Polish/PolishServerConfig.swift index b4aecea..7e9646f 100644 --- a/Sources/ReplicantSwift/Polish/PolishServerConfig.swift +++ b/Sources/ReplicantSwift/Polish/PolishServerConfig.swift @@ -45,7 +45,7 @@ extension PolishServerConfig: PolishConfig } let endpoint = NWEndpoint.hostPort(host: NWEndpoint.Host.ipv4(ipv4), port: NWEndpoint.Port(integerLiteral: port)) - let config = ShadowConfig.ShadowServerConfig(serverAddress: self.serverAddress, serverPrivateKey: self.serverPrivateKey, mode: .DARKSTAR) + let config = try ShadowConfig.ShadowServerConfig(serverAddress: self.serverAddress, serverPrivateKey: self.serverPrivateKey, mode: .DARKSTAR) guard let result = DarkStarServerConnection(connection: connection, endpoint: endpoint, parameters: .tcp, config: config, logger: logger) else { throw PolishServerConfigError.nullDarkStarConnection