Skip to content

Commit 48e284d

Browse files
authored
fix NIO deprecations & update to secure versions (#141)
1 parent de4d1ad commit 48e284d

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Diff for: Package.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ let package = Package(
2121
.library(name: "AsyncHTTPClient", targets: ["AsyncHTTPClient"]),
2222
],
2323
dependencies: [
24-
.package(url: "https://github.com/apple/swift-nio.git", from: "2.10.1"),
25-
.package(url: "https://github.com/apple/swift-nio-ssl.git", from: "2.0.0"),
24+
.package(url: "https://github.com/apple/swift-nio.git", from: "2.11.0"),
25+
.package(url: "https://github.com/apple/swift-nio-ssl.git", from: "2.4.1"),
2626
.package(url: "https://github.com/apple/swift-nio-extras.git", from: "1.3.0"),
2727
],
2828
targets: [

Diff for: Sources/AsyncHTTPClient/HTTPClient.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public class HTTPClient {
4848
public let eventLoopGroup: EventLoopGroup
4949
let eventLoopGroupProvider: EventLoopGroupProvider
5050
let configuration: Configuration
51-
let isShutdown = Atomic<Bool>(value: false)
51+
let isShutdown = NIOAtomic<Bool>.makeAtomic(value: false)
5252

5353
/// Create an `HTTPClient` with specified `EventLoopGroup` provider and configuration.
5454
///

Diff for: Tests/AsyncHTTPClientTests/HTTPClientTestUtils.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ internal final class RecordingHandler<Input, Output>: ChannelDuplexHandler {
9595
internal final class HTTPBin {
9696
let group = MultiThreadedEventLoopGroup(numberOfThreads: 1)
9797
let serverChannel: Channel
98-
let isShutdown: Atomic<Bool> = .init(value: false)
98+
let isShutdown: NIOAtomic<Bool> = .makeAtomic(value: false)
9999

100100
var port: Int {
101101
return Int(self.serverChannel.localAddress!.port!)

0 commit comments

Comments
 (0)