We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dcadb19 commit 545df75Copy full SHA for 545df75
tests/MongoDB.Driver.Core.Tests/Core/Connections/BinaryConnectionTests.cs
@@ -477,8 +477,10 @@ public void ReceiveMessage_should_not_produce_unobserved_task_exceptions_on_fail
477
var mockStream = new Mock<Stream>();
478
EventHandler<UnobservedTaskExceptionEventArgs> eventHandler = (s, args) =>
479
{
480
- unobservedTaskExceptionRaised = true;
481
- args.SetObserved();
+ if (args.Exception.InnerException is MongoConnectionException)
+ {
482
+ unobservedTaskExceptionRaised = true;
483
+ }
484
};
485
486
try
0 commit comments