Skip to content

Commit

Permalink
Handle RtcSession timeout exception properly (#1136)
Browse files Browse the repository at this point in the history
* Catch exceptions when joining call

* Revert "Catch exceptions when joining call"

This reverts commit 6e00a81.

* Catch RTC exceptions in _join() and return Failure result
  • Loading branch information
liviu-timar committed Jul 8, 2024
1 parent 177913d commit 738ea70
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -426,9 +426,13 @@ public class Call(
}
timer.split("rtc session init")

session?.connect()

timer.split("rtc connect completed")
try {
session?.connect()
} catch (e: Exception) {
return Failure(Error.GenericError(e.message ?: "RtcSession error occurred."))
} finally {
timer.split("rtc connect completed")
}

scope.launch {
// wait for the first stream to be added
Expand Down

0 comments on commit 738ea70

Please sign in to comment.