We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 319ebc2 commit 01f18f2Copy full SHA for 01f18f2
FirebaseAI/Sources/Types/Internal/Live/LiveSessionService.swift
@@ -115,8 +115,11 @@ actor LiveSessionService {
115
/// resuming the same session.
116
func connect() {
117
setupTask.cancel()
118
+ // we launch the setup task in a seperate task to avoid blocking the parent context
119
setupTask = Task { [weak self] in
120
+ // we need a continuation to surface that the setup is complete, while still allowing us to listen to the server
121
try await withCheckedThrowingContinuation { setupContinuation in
122
+ // nested task so we can use await
123
Task { [weak self] in
124
guard let self else { return }
125
await self.listenToServer(setupContinuation)
0 commit comments