From f209e9319aa226ba30b728c8c3cff79b2e7ebdff Mon Sep 17 00:00:00 2001 From: Raja Subramanian Date: Sun, 20 Feb 2022 20:52:17 +0530 Subject: [PATCH] Reset channel observer in resetState (#449) * Reset channel observer in resetState * Spelling fix --- pkg/rtc/transport.go | 2 +- pkg/sfu/streamallocator.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/rtc/transport.go b/pkg/rtc/transport.go index bdeaa022b..9c8597fca 100644 --- a/pkg/rtc/transport.go +++ b/pkg/rtc/transport.go @@ -384,7 +384,7 @@ func (t *PCTransport) preparePC(previousAnswer webrtc.SessionDescription) error t.pc.SetLocalDescription(offer) // - // Simulcate client side peer connection and set DTLS role from previous answer. + // Simulate client side peer connection and set DTLS role from previous answer. // Role needs to be set properly (one side needs to be server and the other side // eeds to be the client) for DTLS connection to form properly. As this is // trying to replicate previous setup, read from previous answer and use that role. diff --git a/pkg/sfu/streamallocator.go b/pkg/sfu/streamallocator.go index fa5fc7306..d5d3ea8a4 100644 --- a/pkg/sfu/streamallocator.go +++ b/pkg/sfu/streamallocator.go @@ -242,6 +242,7 @@ func (s *StreamAllocator) SetTrackPriority(downTrack *DownTrack, priority uint8) } func (s *StreamAllocator) resetState() { + s.channelObserver.Reset() s.resetProbe() s.state = StateStable