From aadf08cc6597ebe68739f75d8e84c16fed35b0db Mon Sep 17 00:00:00 2001 From: Justin Kotalik Date: Tue, 16 Mar 2021 13:23:37 -0700 Subject: [PATCH] catch ODE from bedrock framework code (#983) --- src/Microsoft.Tye.Hosting/ProxyService.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Microsoft.Tye.Hosting/ProxyService.cs b/src/Microsoft.Tye.Hosting/ProxyService.cs index a78fa49a..2f668b52 100644 --- a/src/Microsoft.Tye.Hosting/ProxyService.cs +++ b/src/Microsoft.Tye.Hosting/ProxyService.cs @@ -185,7 +185,15 @@ namespace Microsoft.Tye.Hosting if (_host != null) { - await _host.StopAsync(); + try + { + await _host.StopAsync(); + } + catch (ObjectDisposedException) + { + // System.ObjectDisposedException: Cannot access a disposed object. + // From Bedrock.Framework. As we plan on removing this long term, not going to directly fix in bedrock. + } if (_host is IAsyncDisposable disposable) {