Skip to content

Commit

Permalink
Sendable
Browse files Browse the repository at this point in the history
  • Loading branch information
arkavo-com committed Oct 8, 2024
1 parent 2cd8ac5 commit 04e4fc4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion OpenTDFKit/BinaryParser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public class BinaryParser {
}

func readPolicyBinding(bindingMode: PolicyBindingConfig) -> Data? {
var bindingSize
let bindingSize
// print("bindingMode", bindingMode)
= if bindingMode.ecdsaBinding
{
Expand Down
2 changes: 1 addition & 1 deletion OpenTDFKit/KASRest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class KASRest {
self.apiKey = apiKey
}

public func rewrap(key: String, completion: @escaping (Result<String, Error>) -> Void) {
public func rewrap(key: String, completion: @escaping @Sendable (Result<String, Error>) -> Void) {
guard let url = URL(string: "\(baseURL)/rewrap") else {
completion(.failure(NSError(domain: "KASClient", code: -1, userInfo: [NSLocalizedDescriptionKey: "Invalid URL"])))
return
Expand Down
6 changes: 3 additions & 3 deletions OpenTDFKit/KASWebSocket.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ extension WebSocketConnectionState: CustomStringConvertible {
}
}

public class KASWebSocket {
public class KASWebSocket: @unchecked Sendable {
private var webSocketTask: URLSessionWebSocketTask?
private var urlSession: URLSession?
private let myPrivateKey: P256.KeyAgreement.PrivateKey!
Expand Down Expand Up @@ -54,7 +54,7 @@ public class KASWebSocket {
customMessageCallback = callback
}

public func sendCustomMessage(_ message: Data, completion: @escaping (Error?) -> Void) {
public func sendCustomMessage(_ message: Data, completion: @Sendable @escaping (Error?) -> Void) {
let task = URLSessionWebSocketTask.Message.data(message)
webSocketTask?.send(task) { error in
if let error {
Expand Down Expand Up @@ -276,7 +276,7 @@ public class KASWebSocket {
}
}

public func sendPing(completionHandler: @escaping (Error?) -> Void) {
public func sendPing(completionHandler: @escaping @Sendable (Error?) -> Void) {
webSocketTask?.sendPing { error in
if let error {
print("Error sending ping: \(error)")
Expand Down

0 comments on commit 04e4fc4

Please sign in to comment.