Skip to content

Commit bd9a0ae

Browse files
committed
minor: changes from code review
1 parent 7a9796a commit bd9a0ae

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Driver/Core/MongoServerInstance.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,7 @@ internal MongoConnection AcquireConnection(MongoDatabase database)
409409
}
410410
catch (MongoAuthenticationException)
411411
{
412+
// don't let the connection go to waste just because authentication failed
412413
_connectionPool.ReleaseConnection(connection);
413414
throw;
414415
}
@@ -470,7 +471,7 @@ internal void Connect()
470471
{
471472
if (_stateVerificationTimer == null)
472473
{
473-
_stateVerificationTimer = new Timer(_ => StateVerificationTimerCallback(), null, TimeSpan.FromSeconds(10), TimeSpan.FromSeconds(10));
474+
_stateVerificationTimer = new Timer(o => StateVerificationTimerCallback(), null, TimeSpan.FromSeconds(10), TimeSpan.FromSeconds(10));
474475
}
475476
}
476477
}

0 commit comments

Comments
 (0)