From 9991756217027d567460093ffcf9550348ada9bb Mon Sep 17 00:00:00 2001 From: Rockford Wei Date: Sat, 28 May 2022 16:36:31 -0400 Subject: [PATCH] fixing the sendable --- .gitignore | 1 + Sources/PerfectNIO/HTTPOutput/ErrorOutput.swift | 2 +- Sources/PerfectNIO/RouteServer.swift | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index f29d370..a3d5b1a 100644 --- a/.gitignore +++ b/.gitignore @@ -39,6 +39,7 @@ playground.xcworkspace # Package.pins # Package.resolved .build/ +.swiftpm/ # CocoaPods # diff --git a/Sources/PerfectNIO/HTTPOutput/ErrorOutput.swift b/Sources/PerfectNIO/HTTPOutput/ErrorOutput.swift index 31504f2..55413a2 100644 --- a/Sources/PerfectNIO/HTTPOutput/ErrorOutput.swift +++ b/Sources/PerfectNIO/HTTPOutput/ErrorOutput.swift @@ -20,7 +20,7 @@ import Foundation import NIOHTTP1 /// Output which can be thrown -public class ErrorOutput: BytesOutput, Error, CustomStringConvertible { +public class ErrorOutput: BytesOutput, Error, CustomStringConvertible, @unchecked Sendable { public let description: String /// Construct a ErrorOutput with a simple text message public init(status: HTTPResponseStatus, description: String? = nil) { diff --git a/Sources/PerfectNIO/RouteServer.swift b/Sources/PerfectNIO/RouteServer.swift index 612d067..39451ad 100644 --- a/Sources/PerfectNIO/RouteServer.swift +++ b/Sources/PerfectNIO/RouteServer.swift @@ -95,7 +95,7 @@ class NIOBoundRoutes: BoundRoutes { private static func configureHTTPServerPipeline(pipeline: ChannelPipeline, sslContext: NIOSSLContext?) -> EventLoopFuture { var handlers: [ChannelHandler] = [] if let sslContext = sslContext { - let handler = try! NIOSSLServerHandler(context: sslContext) + let handler = NIOSSLServerHandler(context: sslContext) handlers.append(handler) handlers.append(SSLFileRegionHandler()) }