private void DisposeRtpSenders()
{
lock(rtpSenders)
{
Dictionary<uint, RtpSender> senders = new Dictionary<uint,RtpSender>(rtpSenders);
foreach(RtpSender sender in senders.Values)
{
// This calls back into RtpSender.IRtpSession.Dispose
// Which removes the RtpSender from the rtpSenders collection
sender.Dispose();
}
}
}