mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-25 06:16:37 +01:00
Add a timeout of approximately 24 hours to the TickUntilCompletion method.
This commit is contained in:
parent
bb78309279
commit
f11ed643b6
@ -47,6 +47,7 @@ namespace XenAdmin.Actions.OVFActions
|
|||||||
protected XenOvfTransportBase m_transportAction;
|
protected XenOvfTransportBase m_transportAction;
|
||||||
|
|
||||||
private const int SLEEP_TIME = 900;
|
private const int SLEEP_TIME = 900;
|
||||||
|
private const int MAX_ITERATIONS = 60 * 60 * 24; // seconds in 24 hours
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// RBAC dependencies needed to import appliance/export an appliance/import disk image.
|
/// RBAC dependencies needed to import appliance/export an appliance/import disk image.
|
||||||
@ -114,7 +115,8 @@ namespace XenAdmin.Actions.OVFActions
|
|||||||
|
|
||||||
private void TickUntilCompletion()
|
private void TickUntilCompletion()
|
||||||
{
|
{
|
||||||
while (!IsCompleted)
|
int i = 0;
|
||||||
|
while (!IsCompleted && ++i<MAX_ITERATIONS)
|
||||||
{
|
{
|
||||||
OnChanged();
|
OnChanged();
|
||||||
Thread.Sleep(SLEEP_TIME);
|
Thread.Sleep(SLEEP_TIME);
|
||||||
|
Loading…
Reference in New Issue
Block a user