Skip to content

Commit

Permalink
Work around swiftlang/swift#66099 (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
gwynne authored May 24, 2023
1 parent 17c0afb commit 7b6c5bc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Sources/WebSocketKit/WebSocket.swift
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,9 @@ public final class WebSocket {
func makeMaskKey() -> WebSocketMaskingKey? {
switch type {
case .client:
return WebSocketMaskingKey.random()
/// See https://github.com/apple/swift/issues/66099
var generator = SystemRandomNumberGenerator()
return WebSocketMaskingKey.random(using: &generator)
case .server:
return nil
}
Expand Down

0 comments on commit 7b6c5bc

Please sign in to comment.