diff --git a/BeastConfig.h b/BeastConfig.h index 90cbc7864..dd2abedbf 100644 --- a/BeastConfig.h +++ b/BeastConfig.h @@ -164,4 +164,10 @@ #define RIPPLE_USE_NEW_VALIDATORS 0 #endif +// Turning this on makes the Application object get destroyed, +// which is part of an attempt to have a "clean exit." +#ifndef RIPPLE_APPLICATION_CLEAN_EXIT +#define RIPPLE_APPLICATION_CLEAN_EXIT 0 +#endif + #endif diff --git a/modules/ripple_app/main/ripple_Application.cpp b/modules/ripple_app/main/ripple_Application.cpp index d1a0679b5..6b42c2dbe 100644 --- a/modules/ripple_app/main/ripple_Application.cpp +++ b/modules/ripple_app/main/ripple_Application.cpp @@ -141,7 +141,7 @@ public: // VFALCO NOTE Change this to control whether or not the Application // object is destroyed on exit // - #if 1 + #if RIPPLE_APPLICATION_CLEAN_EXIT // Application object will be deleted on exit. If the code doesn't exit // cleanly this could cause hangs or crashes on exit. // @@ -149,9 +149,8 @@ public: #else // This will make it so that the Application object is not deleted on exit. // - : SharedSingleton (SingletonLifetime::neverDestroyed) + : SharedSingleton (SingletonLifetime::neverDestroyed) #endif - , mMasterLock (this, "MasterLock", __FILE__, __LINE__) , m_mainService ("io", (getConfig ().NODE_SIZE >= 2) ? 2 : 1, (getConfig ().NODE_SIZE >= 2) ? 1 : 0)