Adds stop with empty producer warning
This commit is contained in:
@@ -74,8 +74,12 @@ func (p *Producer) start() {
|
|||||||
func (p *Producer) stop() {
|
func (p *Producer) stop() {
|
||||||
log.Debug().Str("url", p.url).Msg("[streams] stop producer")
|
log.Debug().Str("url", p.url).Msg("[streams] stop producer")
|
||||||
|
|
||||||
_ = p.element.Stop()
|
if p.element != nil {
|
||||||
p.element = nil
|
_ = p.element.Stop()
|
||||||
|
p.element = nil
|
||||||
|
} else {
|
||||||
|
log.Warn().Str("url", p.url).Msg("[streams] stop empty producer")
|
||||||
|
}
|
||||||
p.tracks = nil
|
p.tracks = nil
|
||||||
p.state = stateNone
|
p.state = stateNone
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user