ios: fix background refresh (#769)

* ios: fix background refresh

* change app inactive check
This commit is contained in:
Evgeny Poberezkin
2022-07-02 08:50:25 +01:00
committed by GitHub
parent a8ba4ede82
commit 29c6d51e6a
5 changed files with 23 additions and 18 deletions
+1 -2
View File
@@ -564,8 +564,7 @@ class ChatReceiver {
await processReceivedMsg(msg)
}
if self.receiveMessages {
do { try await Task.sleep(nanoseconds: 7_500_000) }
catch { logger.error("receiveMsgLoop: Task.sleep error: \(error.localizedDescription)") }
_ = try? await Task.sleep(nanoseconds: 7_500_000)
await receiveMsgLoop()
}
}