From 06a5dd9c4a2502e7ceaae8e808a1e96b6a3f5c9b Mon Sep 17 00:00:00 2001 From: Christian Risi <75698846+CnF-Gris@users.noreply.github.com> Date: Sun, 15 Dec 2024 22:03:02 +0000 Subject: [PATCH] V0.7.3.b Arroyo toad Modified success paramter to accept async functions --- Sources/IoT-Simulator-Core/IoT_Simulator_Core.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/IoT-Simulator-Core/IoT_Simulator_Core.swift b/Sources/IoT-Simulator-Core/IoT_Simulator_Core.swift index b1476bd..6dbb6a6 100644 --- a/Sources/IoT-Simulator-Core/IoT_Simulator_Core.swift +++ b/Sources/IoT-Simulator-Core/IoT_Simulator_Core.swift @@ -101,7 +101,7 @@ public actor IoTSimulatorCore { private static func schedule( envID: sending String, deviceID: UInt128, - success: sending @escaping (_ msg: Data) throws -> Void, + success: sending @escaping (_ msg: Data) async throws -> Void, failure: sending @escaping () -> Void ) -> Task<(), Never>{ let _devID: String = "\(deviceID)" @@ -117,7 +117,7 @@ public actor IoTSimulatorCore { do { let message = try dev.work(envrionment: env) - try success(message) + try await success(message) } catch { failure() }