From 7c577280802e1b25f7595159c4a0fbcd43357481 Mon Sep 17 00:00:00 2001 From: Luke Bakken Date: Mon, 20 Nov 2023 09:16:58 -0800 Subject: [PATCH] fixup --- .../Test/AsyncIntegration/AsyncIntegrationFixture.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/projects/Test/AsyncIntegration/AsyncIntegrationFixture.cs b/projects/Test/AsyncIntegration/AsyncIntegrationFixture.cs index c8aea404b5..508b9b96ad 100644 --- a/projects/Test/AsyncIntegration/AsyncIntegrationFixture.cs +++ b/projects/Test/AsyncIntegration/AsyncIntegrationFixture.cs @@ -96,12 +96,18 @@ public virtual async Task DisposeAsync() { try { - await _channel.CloseAsync(); - _conn.Close(); + if (_channel != null) + { + await _channel.CloseAsync(); + } + await _conn.CloseAsync(); } finally { - _channel.Dispose(); + if (_channel != null) + { + _channel.Dispose(); + } _conn.Dispose(); _channel = null; _conn = null;