ios: terminate session on network failure, add description for local network access

This commit is contained in:
Evgeny Poberezkin
2023-11-18 22:20:22 +00:00
parent 96e000e3ea
commit f9e5a56e1a
2 changed files with 5 additions and 1 deletions
+3 -1
View File
@@ -1729,7 +1729,9 @@ func processReceivedMsg(_ res: ChatResponse) async {
m.remoteCtrlSession = m.remoteCtrlSession?.updateState(state)
}
case .remoteCtrlStopped:
await MainActor.run {
// This delay is needed to cancel the session that fails on network failure,
// e.g. when user did not grant permission to access local network yet.
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
switchToLocalSession()
}
default: