Skip to content

Commit

Permalink
Fix deprecation in WebSocketClient (#99)
Browse files Browse the repository at this point in the history
* Update WebSocketClient.swift

Fix `TLSConfiguration.forClient()` deprecation warning

* Update NIOSSL version to 2.14.0

Signed-off-by: Axton Pitt <[email protected]>

* Update to trigger build

Signed-off-by: Axton Pitt <[email protected]>
  • Loading branch information
axtonpitt authored Aug 19, 2021
1 parent bf01327 commit d7537b7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@
DerivedData
.swiftpm
Package.resolved

2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ let package = Package(
],
dependencies: [
.package(url: "https://github.com/apple/swift-nio.git", from: "2.11.1"),
.package(url: "https://github.com/apple/swift-nio-ssl.git", from: "2.0.0"),
.package(url: "https://github.com/apple/swift-nio-ssl.git", from: "2.14.0"),
],
targets: [
.target(name: "WebSocketKit", dependencies: [
Expand Down
2 changes: 1 addition & 1 deletion Sources/WebSocketKit/WebSocketClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public final class WebSocketClient {
if scheme == "wss" {
do {
let context = try NIOSSLContext(
configuration: self.configuration.tlsConfiguration ?? .forClient()
configuration: self.configuration.tlsConfiguration ?? .makeClientConfiguration()
)
let tlsHandler = try NIOSSLClientHandler(context: context, serverHostname: host)
return channel.pipeline.addHandler(tlsHandler).flatMap {
Expand Down

0 comments on commit d7537b7

Please sign in to comment.