This commit is contained in:
anlicheng 2025-08-03 01:31:38 +08:00
parent c8f1787ea2
commit 2d6adba8a8

View File

@ -100,13 +100,19 @@ actor SDLSuperClient {
// --MARK:
group.addTask {
while true {
do {
try Task.checkCancellation()
//await self.ping()
try Task.checkCancellation()
try await Task.sleep(nanoseconds: 5 * 1_000_000_000)
try Task.checkCancellation()
}
} catch let err {
NSLog("[SDLSuperClient] heartbeat cancelled")
throw err
}
}
}
try await group.waitForAll()