Skip to content

Commit 866f8a9

Browse files
committed
Removed unused parameter
1 parent 2df3478 commit 866f8a9

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/MongoDB.Driver/Core/Operations/RetryableReadOperationExecutor.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public static TResult Execute<TResult>(OperationContext operationContext, IRetry
4444
}
4545
catch (Exception ex)
4646
{
47-
if (!ShouldRetryOperation(operationContext, context, server, ex, totalAttempts))
47+
if (!ShouldRetryOperation(operationContext, context, ex, totalAttempts))
4848
{
4949
throw originalException ?? ex;
5050
}
@@ -76,7 +76,7 @@ public static async Task<TResult> ExecuteAsync<TResult>(OperationContext operati
7676
}
7777
catch (Exception ex)
7878
{
79-
if (!ShouldRetryOperation(operationContext, context, server, ex, totalAttempts))
79+
if (!ShouldRetryOperation(operationContext, context, ex, totalAttempts))
8080
{
8181
throw originalException ?? ex;
8282
}
@@ -88,11 +88,8 @@ public static async Task<TResult> ExecuteAsync<TResult>(OperationContext operati
8888
}
8989

9090
// private static methods
91-
private static bool ShouldRetryOperation(OperationContext operationContext, RetryableReadContext context, ServerDescription server, Exception exception, int totalAttempts)
91+
private static bool ShouldRetryOperation(OperationContext operationContext, RetryableReadContext context, Exception exception, int totalAttempts)
9292
{
93-
if (server is null)
94-
return false;
95-
9693
exception = exception is MongoAuthenticationException mongoAuthenticationException ? mongoAuthenticationException.InnerException : exception;
9794

9895
if (!context.RetryRequested || context.Binding.Session.IsInTransaction)

0 commit comments

Comments
 (0)