0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

don't clean up Client in static shutdown as its not safe to lock

This commit is contained in:
Eliot Horowitz 2011-07-25 15:52:19 -04:00
parent 176dad642a
commit a08904e886

View File

@ -122,10 +122,13 @@ namespace mongo {
error() << "Client::shutdown not called: " << _desc << endl;
}
scoped_lock bl(clientsMutex);
if ( ! _shutdown )
clients.erase(this);
delete _curOp;
if ( ! inShutdown() ) {
// we can't clean up safely once we're in shutdown
scoped_lock bl(clientsMutex);
if ( ! _shutdown )
clients.erase(this);
delete _curOp;
}
}
bool Client::shutdown() {