mirror of
https://github.com/livekit/livekit.git
synced 2026-08-28 00:44:12 +00:00
Delete down track on close (#374)
Note that it is called from Unbind also (previous behaviour). It should be fine as long as there is no new down track for the same peer added between close calling it and unbind calling it.
This commit is contained in:
@@ -453,9 +453,12 @@ func (d *DownTrack) CloseWithFlush(flush bool) {
|
||||
|
||||
d.closeOnce.Do(func() {
|
||||
Logger.V(1).Info("Closing sender", "peer_id", d.peerID, "kind", d.kind)
|
||||
d.receiver.DeleteDownTrack(d.peerID)
|
||||
|
||||
if d.onCloseHandler != nil {
|
||||
d.onCloseHandler()
|
||||
}
|
||||
|
||||
close(d.done)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user