Log unpublish for debug. (#2451)
Also, call unpublish callback irrespective of state and let callback handle do the needed checks.
This commit is contained in:
@@ -2062,12 +2062,9 @@ func (p *ParticipantImpl) addMediaTrack(signalCid string, sdpCid string, ti *liv
|
|||||||
|
|
||||||
p.dirty.Store(true)
|
p.dirty.Store(true)
|
||||||
|
|
||||||
if !p.IsClosed() {
|
p.pubLogger.Infow("track unpublished", "trackID", ti.Sid, "track", logger.Proto(ti))
|
||||||
// unpublished events aren't necessary when participant is closed
|
if onTrackUnpublished := p.getOnTrackUnpublished(); onTrackUnpublished != nil {
|
||||||
p.pubLogger.Debugw("track unpublished", "trackID", ti.Sid, "track", logger.Proto(ti))
|
onTrackUnpublished(p, mt)
|
||||||
if onTrackUnpublished := p.getOnTrackUnpublished(); onTrackUnpublished != nil {
|
|
||||||
onTrackUnpublished(p, mt)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user