mirror of
https://github.com/livekit/livekit.git
synced 2026-10-22 17:32:23 +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:
1 parent
c92e0e38d5
commit
44afa8bae1
1 file changed
+3
@@ -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