fix
This commit is contained in:
parent
c8f1787ea2
commit
2d6adba8a8
@ -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()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user