Skip to content

Commit 5ae75ed

Browse files
committed
* Integration test DisposeAsync should only close channel and conn when not-null and still open
1 parent 4f01e19 commit 5ae75ed

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

projects/Test/Common/IntegrationFixture.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -179,13 +179,13 @@ public virtual async Task DisposeAsync()
179179
{
180180
try
181181
{
182-
if (_channel != null)
182+
if (_conn != null && _conn.IsOpen)
183183
{
184-
await _channel.CloseAsync();
185-
}
184+
if (_channel != null && _channel.IsOpen)
185+
{
186+
await _channel.CloseAsync();
187+
}
186188

187-
if (_conn != null)
188-
{
189189
await _conn.CloseAsync();
190190
}
191191
}

0 commit comments

Comments
 (0)