This reverts commit 5e9f82f.
…'s loop This restores the startup timing that was changed by commit e3b8349, while preserving the smaller time window within the loop between checking for termination and calling ReplicaSetMonitor::checkAll().
…tion Use StaticObserver to end ReplicaSetMonitorWatcher's loop when a program using the C++ driver exits. Move the sleep to the bottom of the loop to reduce the window between checking for termination and the call to ReplicaSetMonitor::checkAll().
Change the order of some static objects and group them near the start of the source file, along with a comment explaining what is going on. The crashes we've seen have been due to destructors for ReplicaSetMonitors (triggered by the destruction of _sets) trying to use the _seedServers map, which had been destroyed already. By changing the order of the object definitions, we destroy _sets before destroying _seedServers, preventing the crash. There may be other cases that are not solved by this fix, and there is still a race due to the running ReplicaSetMonitorWatcher thread, so this is unlikely to be the last word on crashes of this type.
Restore the exception object field that the test is looking for.
Convert the location found within the temporary string into the equivalent (and correct) location in the source string.
Also remove src/mongo/db/matcher.cpp which #includes matcher_old.cpp, which no longer exists.