Skip to content

Commit

Permalink
catch correct exception
Browse files Browse the repository at this point in the history
  • Loading branch information
tugberkugurlu committed Jan 30, 2017
1 parent d73e54d commit d4f1889
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public void Dispose()
{
_mongoTestServer.Dispose();
}
catch(ObjectDisposedException)
catch(AggregateException ex) when(ex.GetBaseException().GetType() == typeof(ObjectDisposedException))
{
/*
It's for some reason, disposing MongoTestServer can give us ObjectDisposedException. I have only
Expand Down

0 comments on commit d4f1889

Please sign in to comment.