summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/bgsync.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/repl/bgsync.cpp')
-rw-r--r--src/mongo/db/repl/bgsync.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mongo/db/repl/bgsync.cpp b/src/mongo/db/repl/bgsync.cpp
index 50aaea8c3f9..855a440e905 100644
--- a/src/mongo/db/repl/bgsync.cpp
+++ b/src/mongo/db/repl/bgsync.cpp
@@ -255,7 +255,10 @@ void BackgroundSync::_runProducer() {
void BackgroundSync::_produce(OperationContext* txn) {
while (MONGO_FAIL_POINT(pauseRsBgSyncProducer)) {
- sleepmillis(0);
+ if (inShutdown()) {
+ return;
+ }
+ sleepmillis(10);
}
// this oplog reader does not do a handshake because we don't want the server it's syncing