We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b7ac0e7 commit 1ae46abCopy full SHA for 1ae46ab
s/strategy.cpp
@@ -90,7 +90,7 @@ namespace mongo {
90
OID lastID;
91
lastID.clear();
92
int secsToSleep = 0;
93
- while ( Shard::isMember( _addr ) ){
+ while ( ! inShutdown() && Shard::isMember( _addr ) ){
94
95
if ( lastID.isSet() ){
96
scoped_lock lk( _seenWritebacksLock );
@@ -159,8 +159,14 @@ namespace mongo {
159
continue;
160
}
161
catch ( std::exception e ){
162
- log() << "WriteBackListener exception : " << e.what() << endl;
163
+ if ( inShutdown() ){
164
+ // we're shutting down, so just clean up
165
+ return;
166
+ }
167
+
168
+ log() << "WriteBackListener exception : " << e.what() << endl;
169
170
// It's possible this shard was removed
171
Shard::reloadShardInfo();
172
0 commit comments