From 0e3628e23cb3a41a7829eb7ba675fbce2e3d8525 Mon Sep 17 00:00:00 2001 From: OrlandoCo Date: Thu, 9 Sep 2021 09:08:33 -0500 Subject: [PATCH] fix 582: deadlock on addDatachannel (#583) --- pkg/sfu/session.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/sfu/session.go b/pkg/sfu/session.go index 22f6c97fa..24719a2cd 100644 --- a/pkg/sfu/session.go +++ b/pkg/sfu/session.go @@ -163,6 +163,7 @@ func (s *SessionLocal) AddDatachannel(owner string, dc *webrtc.DataChannel) { s.mu.Lock() for _, lbl := range s.fanOutDCs { if label == lbl { + s.mu.Unlock() return } }