diff --git a/Sources/WebSocketKit/WebSocketClient.swift b/Sources/WebSocketKit/WebSocketClient.swift index d26cfd18..6ee4cebf 100644 --- a/Sources/WebSocketKit/WebSocketClient.swift +++ b/Sources/WebSocketKit/WebSocketClient.swift @@ -36,7 +36,7 @@ public final class WebSocketClient { let eventLoopGroupProvider: EventLoopGroupProvider let group: EventLoopGroup let configuration: Configuration - let isShutdown = Atomic(value: false) + let isShutdown = NIOAtomic.makeAtomic(value: false) public init(eventLoopGroupProvider: EventLoopGroupProvider, configuration: Configuration = .init()) { self.eventLoopGroupProvider = eventLoopGroupProvider @@ -73,7 +73,7 @@ public final class WebSocketClient { for _ in 0..<16 { key.append(.random(in: .min ..< .max)) } - let websocketUpgrader = NIOWebClientSocketUpgrader( + let websocketUpgrader = NIOWebSocketClientUpgrader( requestKey: Data(key).base64EncodedString(), maxFrameSize: self.configuration.maxFrameSize, automaticErrorHandling: true,