Skip to content

Commit 0fc39ef

Browse files
committed
Small fix
1 parent db819bb commit 0fc39ef

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,8 @@ private static bool ShouldRetryOperation(OperationContext operationContext, Retr
107107

108108
private static HashSet<ServerDescription> UpdateServerList(ServerDescription server, HashSet<ServerDescription> deprioritizedServers, Exception ex)
109109
{
110-
if (server != null &&
111-
(server.Type == ServerType.ShardRouter ||
112-
(ex is MongoException mongoException && mongoException.HasErrorLabel("SystemOverloadedError"))))
110+
if (server != null && (server.Type == ServerType.ShardRouter ||
111+
(ex is MongoException mongoException && mongoException.HasErrorLabel("SystemOverloadedError"))))
113112
{
114113
deprioritizedServers ??= [];
115114
deprioritizedServers.Add(server);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ private static bool IsOperationAcknowledged(WriteConcern writeConcern)
175175
private static HashSet<ServerDescription> UpdateServerList(ServerDescription server, HashSet<ServerDescription> deprioritizedServers, Exception ex)
176176
{
177177
if (server != null && (server.Type == ServerType.ShardRouter ||
178-
(ex is MongoException mongoException && mongoException.HasErrorLabel("SystemOverloadedError"))))
178+
(ex is MongoException mongoException && mongoException.HasErrorLabel("SystemOverloadedError"))))
179179
{
180180
deprioritizedServers ??= [];
181181
deprioritizedServers.Add(server);

0 commit comments

Comments
 (0)