diff options
author | Aaron <aaron@10gen.com> | 2010-03-08 13:05:40 -0800 |
---|---|---|
committer | Aaron <aaron@10gen.com> | 2010-03-09 10:01:15 -0800 |
commit | b2973e7cc31b830fe9dd8ddca58af231125394bc (patch) | |
tree | 419a06f5b4522301aa5032f3b8b457c9e3cbfc8c | |
parent | 447c9df927ded60e696086e98c1ca6a15b207756 (diff) | |
download | mongo-b2973e7cc31b830fe9dd8ddca58af231125394bc.tar.gz |
SERVER-705 exit cleanly from db.cpp instead of instance.cpp
-rw-r--r-- | db/db.cpp | 5 | ||||
-rw-r--r-- | db/db.h | 2 | ||||
-rw-r--r-- | db/instance.cpp | 3 |
3 files changed, 5 insertions, 5 deletions
diff --git a/db/db.cpp b/db/db.cpp index 489287d2773..ab2e6cb5020 100644 --- a/db/db.cpp +++ b/db/db.cpp @@ -65,6 +65,8 @@ namespace mongo { void pairWith(const char *remoteEnd, const char *arb); void setRecCacheSize(unsigned MB); + void exitCleanly( ExitCode code ); + const char *ourgetns() { Client *c = currentClient.get(); return c ? c->ns() : ""; @@ -224,6 +226,9 @@ namespace mongo { problem() << "SocketException in connThread, closing client connection" << endl; dbMsgPort.shutdown(); } + catch ( const ClockSkewException &e ) { + exitCleanly( EXIT_CLOCK_SKEW ); + } catch ( std::exception &e ) { problem() << "Uncaught std::exception: " << e.what() << ", terminating" << endl; dbexit( EXIT_UNCAUGHT ); @@ -129,8 +129,6 @@ namespace mongo { } }; - void exitCleanly( ExitCode code ); - } // namespace mongo #include "dbinfo.h" diff --git a/db/instance.cpp b/db/instance.cpp index 83cf0be4271..6b83ba4a0ad 100644 --- a/db/instance.cpp +++ b/db/instance.cpp @@ -262,9 +262,6 @@ namespace mongo { ss << " exception " + e.toString(); log = true; } - catch ( ClockSkewException &e ) { - exitCleanly( EXIT_CLOCK_SKEW ); - } } else if ( op == dbKillCursors ) { OPREAD; |