fix
This commit is contained in:
parent
5756422ebb
commit
bedf7a01fc
@ -98,13 +98,16 @@ actor SDLSuperClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// --MARK: 心跳机制
|
// --MARK: 心跳机制
|
||||||
// group.addTask {
|
group.addTask {
|
||||||
// while !Task.isCancelled {
|
while true {
|
||||||
// await self.ping()
|
try Task.checkCancellation()
|
||||||
// try await Task.sleep(nanoseconds: 5 * 1_000_000_000)
|
await self.ping()
|
||||||
// }
|
try Task.checkCancellation()
|
||||||
// NSLog("[SDLSuperClient] heartbeat cancelled")
|
try await Task.sleep(nanoseconds: 5 * 1_000_000_000)
|
||||||
// }
|
try Task.checkCancellation()
|
||||||
|
}
|
||||||
|
NSLog("[SDLSuperClient] heartbeat cancelled")
|
||||||
|
}
|
||||||
|
|
||||||
try await group.waitForAll()
|
try await group.waitForAll()
|
||||||
NSLog("[SDLSuperClient] group closed")
|
NSLog("[SDLSuperClient] group closed")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user