Skip to content

Commit 585036b

Browse files
committed
Revert states on catch
1 parent 7a71453 commit 585036b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Sources/LiveKit/Agent/Session.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,12 +255,15 @@ open class Session: ObservableObject {
255255
try await connect()
256256
}
257257
} else {
258+
connectionState = .connecting
258259
agent.connecting(buffering: false)
259260
try await connect()
260261
try await room.localParticipant.setMicrophone(enabled: true)
261262
}
262263
} catch {
263264
self.error = .failedToConnect(error)
265+
connectionState = .disconnected
266+
agent.disconnected()
264267
}
265268
}
266269

0 commit comments

Comments
 (0)