Skip to content

Commit 29199e5

Browse files
vbabaninrozza
andauthored
Update driver-core/src/main/com/mongodb/internal/connection/OperationContext.java
Co-authored-by: Ross Lawley <ross.lawley@gmail.com>
1 parent 1f4c0c9 commit 29199e5

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

driver-core/src/main/com/mongodb/internal/connection/OperationContext.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,8 @@ public void onAttemptFailure(final Throwable failure) {
250250
return;
251251
}
252252

253-
boolean isSystemOverloadedError = failure instanceof MongoException && ((MongoException) failure).hasErrorLabel("SystemOverloadedError");
253+
boolean isSystemOverloadedError = failure instanceof MongoException
254+
&& ((MongoException) failure).hasErrorLabel(MongoException.SYSTEM_OVERLOADED_ERROR_LABEL);
254255
if (clusterType == ClusterType.SHARDED || isSystemOverloadedError) {
255256
deprioritized.add(candidate);
256257
}

0 commit comments

Comments
 (0)