diff --git a/source/Octopus.Tentacle.Client/Scripts/ObservingScriptOrchestrator.cs b/source/Octopus.Tentacle.Client/Scripts/ObservingScriptOrchestrator.cs index cb4b10092..d304290bb 100644 --- a/source/Octopus.Tentacle.Client/Scripts/ObservingScriptOrchestrator.cs +++ b/source/Octopus.Tentacle.Client/Scripts/ObservingScriptOrchestrator.cs @@ -57,7 +57,6 @@ public async Task ExecuteScript(ExecuteScriptCommand comm var (lastStatusResponse, lastTicketForNextStatus) = await ObserveUntilComplete(scriptStatus, ticketForNextStatus, scriptExecutionCancellationToken).ConfigureAwait(false); await onScriptCompleted(scriptExecutionCancellationToken).ConfigureAwait(false); - lastStatusResponse = await structuredScriptOrchestrator.Finish(lastTicketForNextStatus, scriptExecutionCancellationToken).ConfigureAwait(false) ?? lastStatusResponse; diff --git a/source/Octopus.Tentacle.Client/Scripts/ScriptServiceV2Orchestrator.cs b/source/Octopus.Tentacle.Client/Scripts/ScriptServiceV2Orchestrator.cs index 9abcb5346..45c8d87a9 100644 --- a/source/Octopus.Tentacle.Client/Scripts/ScriptServiceV2Orchestrator.cs +++ b/source/Octopus.Tentacle.Client/Scripts/ScriptServiceV2Orchestrator.cs @@ -161,7 +161,7 @@ async Task GetStatusAction(CancellationToken ct) public async Task<(ScriptStatus, ITicketForNextStatus)> Cancel(ITicketForNextStatus lastStatusResponse, CancellationToken scriptExecutionCancellationToken) { - return Map(await _GetStatus(lastStatusResponse, scriptExecutionCancellationToken)); + return Map(await _Cancel(lastStatusResponse, scriptExecutionCancellationToken)); } private async Task _Cancel(ITicketForNextStatus lastStatusResponse, CancellationToken scriptExecutionCancellationToken)