From fd76abb61de09a9fceabb75acd4d6332ad5f3548 Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Mon, 17 May 2021 03:54:58 +0200 Subject: [PATCH] Send up actions synchronously. --- rtpconn/rtpconn.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/rtpconn/rtpconn.go b/rtpconn/rtpconn.go index f6551a7..8d2842f 100644 --- a/rtpconn/rtpconn.go +++ b/rtpconn/rtpconn.go @@ -366,15 +366,12 @@ func (up *rtpUpTrack) AddLocal(local conn.DownTrack) error { } } up.local = append(up.local, local) - - // do this asynchronously, to avoid deadlocks when multiple - // clients call this simultaneously. - go up.action(trackActionAdd, local) + up.action(trackActionAdd, local) return nil } func (up *rtpUpTrack) RequestKeyframe() error { - go up.action(trackActionKeyframe, nil) + up.action(trackActionKeyframe, nil) return nil }