summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2011-08-30 23:12:35 -0400
committerEliot Horowitz <eliot@10gen.com>2011-08-30 23:12:59 -0400
commit640fc155cd9c0527fa29cfff84ec916932e89095 (patch)
tree6d570bff89b85249f0a8805cd9cbde607bb4b759
parent94256036c7edad39b97ecf8a949d7dab6e464819 (diff)
downloadmongo-640fc155cd9c0527fa29cfff84ec916932e89095.tar.gz
correct fix for SERVER-3002
-rw-r--r--s/cursors.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/s/cursors.cpp b/s/cursors.cpp
index cdfc3211100..12b3d5e7d2f 100644
--- a/s/cursors.cpp
+++ b/s/cursors.cpp
@@ -276,6 +276,8 @@ namespace mongo {
log() << "killing old cursor " << i->second->getId() << " idle for: " << idleFor << "ms" << endl; // TODO: make log(1)
_cursors.erase( i );
i = _cursors.begin(); // possible 2nd entry will get skipped, will get on next pass
+ if ( i == _cursors.end() )
+ break;
}
}