mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-25 06:16:37 +01:00
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:
parent
3ffd370d81
commit
f908abe28d
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user