Skip to content

Commit 160f8fb

Browse files
committed
Fix pre-connect gap
1 parent 565db30 commit 160f8fb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Sources/LiveKit/Agent/Session.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,10 @@ open class Session: ObservableObject {
248248
do {
249249
if options.preConnectAudio {
250250
try await room.withPreConnectAudio(timeout: timeout) {
251-
await MainActor.run { self.agent.listening() }
251+
await MainActor.run {
252+
self.connectionState = .connecting
253+
self.agent.listening()
254+
}
252255
try await connect()
253256
}
254257
} else {

0 commit comments

Comments
 (0)