summaryrefslogtreecommitdiff
path: root/src/mongo/s/query/cluster_find.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/s/query/cluster_find.cpp')
-rw-r--r--src/mongo/s/query/cluster_find.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/s/query/cluster_find.cpp b/src/mongo/s/query/cluster_find.cpp
index 0cc9cc3a336..367c2303be9 100644
--- a/src/mongo/s/query/cluster_find.cpp
+++ b/src/mongo/s/query/cluster_find.cpp
@@ -397,7 +397,8 @@ Status setUpOperationContextStateForGetMore(OperationContext* opCtx,
"maxTimeMS can only be used with getMore for tailable, awaitData cursors"};
} else if (cursor->getLeftoverMaxTimeMicros() < Microseconds::max()) {
// Be sure to do this only for non-tailable cursors.
- opCtx->setDeadlineAfterNowBy(cursor->getLeftoverMaxTimeMicros());
+ opCtx->setDeadlineAfterNowBy(cursor->getLeftoverMaxTimeMicros(),
+ ErrorCodes::MaxTimeMSExpired);
}
return Status::OK();
}