From fd5517f3017cd64056dc6224ce3685f0245071a0 Mon Sep 17 00:00:00 2001 From: Andrew Stanton-Nurse Date: Mon, 22 Jul 2019 09:20:40 -0700 Subject: [PATCH] Be more defensive in BufferingDisabled test (#12278) Fixes https://github.com/aspnet/AspNetCore-Internal/issues/2826 We [use `?.` in `master`](https://github.com/aspnet/AspNetCore/blob/f56cb72b7fa01ea09c3d3b128aaeb9cee937b371/src/Hosting/Server.IntegrationTesting/src/Deployers/ApplicationDeployer.cs#L103) and it seems like the test can end up in this state (by the linked issue) so back-porting that defensive measure seems reasonable. --- .../src/Deployers/ApplicationDeployer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Hosting/Server.IntegrationTesting/src/Deployers/ApplicationDeployer.cs b/src/Hosting/Server.IntegrationTesting/src/Deployers/ApplicationDeployer.cs index 5e1457e70f..5fcfe30907 100644 --- a/src/Hosting/Server.IntegrationTesting/src/Deployers/ApplicationDeployer.cs +++ b/src/Hosting/Server.IntegrationTesting/src/Deployers/ApplicationDeployer.cs @@ -97,7 +97,7 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting } else { - _publishedApplication.Dispose(); + _publishedApplication?.Dispose(); } } }