diff --git a/pkg/core/custom.go b/pkg/core/custom.go index 6b51e387..b9c89c36 100644 --- a/pkg/core/custom.go +++ b/pkg/core/custom.go @@ -25,5 +25,7 @@ func (c *Connection) StartBitrateWorker() { } func (c *Connection) StopBitrateWorker() { - c.stopBitrateWorker <- struct{}{} + if c.stopBitrateWorker != nil { + c.stopBitrateWorker <- struct{}{} + } }