Fix panic on reconnect #828

This commit is contained in:
Alex X
2024-01-01 09:30:40 +03:00
parent a724c5f3ce
commit 9feb98db3f
+3
View File
@@ -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()