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