CA-203345: Exporting snapshot jams and cant be cancelled (when exporting 2 snapshots to the same file)

Replaced the call to Task.destroy() with the DestroyTask() method, which additionally sets RelatedTask to null. This ensures that we stop polling the task for its progress and report the error.

Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
This commit is contained in:
Mihaela Stoica 2016-07-07 15:27:45 +01:00
parent 8de55cb90c
commit 727c7a5212

View File

@ -131,7 +131,7 @@ namespace XenAdmin.Actions
// which probably means there was an exception in the GUI code before the
// action got going. Kill the task so that we don't block forever on
// taskThread.Join(). Brought to light by CA-11100.
XenAPI.Task.destroy(this.Session, this.RelatedTask.opaque_ref);
DestroyTask();
}
// Test for null: don't overwrite a previous exception
if (_exception == null)