From 9feb98db3f7b7e82617f7af0c152b743501751dc Mon Sep 17 00:00:00 2001 From: Alex X Date: Mon, 1 Jan 2024 09:30:40 +0300 Subject: [PATCH] Fix panic on reconnect #828 --- pkg/core/track.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/core/track.go b/pkg/core/track.go index 1faae309..0a3a701c 100644 --- a/pkg/core/track.go +++ b/pkg/core/track.go @@ -73,6 +73,9 @@ func (t *Receiver) Replace(target *Receiver) { // move this receiver senders to new receiver t.mu.Lock() senders := t.senders + // fix https://github.com/AlexxIT/go2rtc/issues/828 + // TODO: fix the reason, not the consequence + t.senders = nil t.mu.Unlock() target.mu.Lock()