Fixed end all not working - many hours chasing error

This commit is contained in:
Heath Volmer
2017-09-22 13:20:50 -06:00
parent f498d55dd6
commit 1c63e506b8
8 changed files with 124 additions and 51 deletions

View File

@@ -91,8 +91,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
public override void EndAllCalls()
{
Debug.Console(1, this, "EndAllCalls");
foreach (var call in ActiveCalls)
for(int i = ActiveCalls.Count - 1; i >= 0; i--)
{
var call = ActiveCalls[i];
ActiveCalls.Remove(call);
SetNewCallStatusAndFireCallStatusChange(eCodecCallStatus.Disconnected, call);
}