diff --git a/visual-dotnet/SauceLabs.Visual/VisualClient.cs b/visual-dotnet/SauceLabs.Visual/VisualClient.cs index 0624597f..477a544b 100644 --- a/visual-dotnet/SauceLabs.Visual/VisualClient.cs +++ b/visual-dotnet/SauceLabs.Visual/VisualClient.cs @@ -110,12 +110,19 @@ public async Task VisualCheck(string name, VisualCheckOptions? options = return result.Result.Id; } - public void Dispose() + /// + /// Cleanup set a correct status to the build. No action should be made after that calling Cleanup. + /// + public async Task Cleanup() { if (!_externalBuild) { - FinishBuild(Build); + await FinishBuild(Build); } + } + + public void Dispose() + { _api.Dispose(); }