diff options
Diffstat (limited to 'src/mongo/util/read_through_cache.h')
-rw-r--r-- | src/mongo/util/read_through_cache.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mongo/util/read_through_cache.h b/src/mongo/util/read_through_cache.h index b3ff5aeefc8..2fe230bdd41 100644 --- a/src/mongo/util/read_through_cache.h +++ b/src/mongo/util/read_through_cache.h @@ -540,10 +540,11 @@ private: auto p(std::move(promisesToSet.back())); promisesToSet.pop_back(); - if (promisesToSet.empty()) + if (promisesToSet.empty()) { p->setFrom(std::move(result)); - else - p->setFrom(result); + break; + } + p->setFrom(result); } return mustDoAnotherLoop |