diff --git a/Package.swift b/Package.swift index fcc4db317..27f89a058 100644 --- a/Package.swift +++ b/Package.swift @@ -13,7 +13,7 @@ let package = Package( dependencies: [ .package(url: "https://github.com/apple/swift-log.git", from: "1.4.0"), .package(url: "https://github.com/apple/swift-metrics.git", "1.0.0"..<"3.0.0"), - .package(url: "https://github.com/apple/swift-nio.git", from: "2.21.0"), + .package(url: "https://github.com/apple/swift-nio.git", from: "2.26.0"), .package(url: "https://github.com/apple/swift-nio-extras.git", from: "1.7.0"), .package(url: "https://github.com/apple/swift-nio-http2.git", from: "1.16.1"), .package(url: "https://github.com/apple/swift-nio-ssl.git", from: "2.4.0"), diff --git a/Sources/HummingbirdFoundation/Files/FileIO.swift b/Sources/HummingbirdFoundation/Files/FileIO.swift index 578556bc9..9a5e90337 100644 --- a/Sources/HummingbirdFoundation/Files/FileIO.swift +++ b/Sources/HummingbirdFoundation/Files/FileIO.swift @@ -94,7 +94,7 @@ public struct HBFileIO { let futureResult: EventLoopFuture switch contents { case .byteBuffer(let buffer): - guard let buffer = buffer else { return context.eventLoop.makeSucceededFuture(()) } + guard let buffer = buffer else { return context.eventLoop.makeSucceededVoidFuture() } futureResult = writeFile(buffer: buffer, handle: handle, on: context.eventLoop) case .stream(let streamer): futureResult = writeFile(stream: streamer, handle: handle, on: context.eventLoop)