CP-36392: Refactor useless for loop into if statement in ConsolePanel.cs

For loop is acting as if block

Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>
This commit is contained in:
Danilo Del Busso 2021-09-14 13:24:56 +01:00
parent 3ffd370d81
commit f908abe28d

View File

@ -310,10 +310,9 @@ namespace XenAdmin.Controls
// find the <VM, VNCView> pair in vncViews and start timer on the vm
var views = vncViews.Where(kvp => kvp.Value == vncView).ToList();
foreach (var kvp in views)
if (views.Count > 0)
{
StartCloseVNCTimer(kvp.Key);
break;
StartCloseVNCTimer(views.First().Key);
}
}