Skip to content

Commit

Permalink
try another fix [publish]
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlapa committed Jul 29, 2024
1 parent ae31727 commit 20148c9
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,8 @@ class PeerObserver : PeerConnection.Observer {
override fun onTrack(transceiver: RtpTransceiver?) {
if (transceiver != null && peer != null) {
if (!peer!!.disposed) {
val receiverId = transceiver.receiver.id()
Handler(Looper.getMainLooper()).post {
val receiverId: String
try {
receiverId = transceiver.receiver.id()
} catch (e: IllegalStateException) {
// Receiver is dead already - exit callback.
return@post
}
val transceivers = peer?.getTransceivers()!!
for (trans in transceivers) {
if (trans.receiver.id == receiverId) {
Expand Down

0 comments on commit 20148c9

Please sign in to comment.