From aaf53bb797488f91047c04a5e07d400995ed7b2d Mon Sep 17 00:00:00 2001 From: Eliot Horowitz Date: Tue, 31 Aug 2010 09:47:01 -0400 Subject: [PATCH] make shutdownServer a little cleaner, no ~Client error --- db/dbcommands_generic.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/db/dbcommands_generic.cpp b/db/dbcommands_generic.cpp index ecab7f2ec89..5d054c72e42 100644 --- a/db/dbcommands_generic.cpp +++ b/db/dbcommands_generic.cpp @@ -189,7 +189,7 @@ namespace mongo { virtual bool slaveOk() const { return true; } - virtual LockType locktype() const { return WRITE; } + virtual LockType locktype() const { return NONE; } virtual void help( stringstream& help ) const { help << "shutdown the database. must be ran against admin db and either (1) ran from localhost or (2) authenticated.\n"; } @@ -199,8 +199,12 @@ namespace mongo { if ( c ) { c->shutdown(); } + log() << "terminating, shutdown command received" << endl; + + dblock l; dbexit( EXIT_CLEAN ); // this never returns + assert(0); return true; } } cmdShutdown;