summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/collection_cloner.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/repl/collection_cloner.cpp')
-rw-r--r--src/mongo/db/repl/collection_cloner.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/db/repl/collection_cloner.cpp b/src/mongo/db/repl/collection_cloner.cpp
index 1680c6d91fc..a3358a67a92 100644
--- a/src/mongo/db/repl/collection_cloner.cpp
+++ b/src/mongo/db/repl/collection_cloner.cpp
@@ -411,8 +411,10 @@ void CollectionCloner::handleNextBatch(DBClientCursor& cursor) {
}
// Schedule the next document batch insertion.
- auto&& scheduleResult = _scheduleDbWorkFn(
- [=](const executor::TaskExecutor::CallbackArgs& cbd) { insertDocumentsCallback(cbd); });
+ auto&& scheduleResult =
+ _scheduleDbWorkFn([=, this](const executor::TaskExecutor::CallbackArgs& cbd) {
+ insertDocumentsCallback(cbd);
+ });
if (!scheduleResult.isOK()) {
Status newStatus = scheduleResult.getStatus().withContext(