mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Improve watchdog start logic
This commit is contained in:
@@ -267,20 +267,6 @@ int run (int argc, char** argv)
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Use a watchdog process unless we're invoking a stand alone type of mode
|
||||
//
|
||||
if (HaveSustain ()
|
||||
&& !vm.count ("parameters")
|
||||
&& !vm.count ("fg")
|
||||
&& !vm.count ("standalone")
|
||||
&& !vm.count ("unittest"))
|
||||
{
|
||||
std::string logMe = DoSustain ();
|
||||
|
||||
if (!logMe.empty ())
|
||||
std::cerr << logMe << std::endl;
|
||||
}
|
||||
|
||||
// Run the unit tests if requested.
|
||||
// The unit tests will exit the application with an appropriate return code.
|
||||
//
|
||||
@@ -434,6 +420,14 @@ int run (int argc, char** argv)
|
||||
// No arguments. Run server.
|
||||
if (!vm.count ("parameters"))
|
||||
{
|
||||
if (HaveSustain() && !vm.count ("fg") && !config->RUN_STANDALONE)
|
||||
{
|
||||
auto const ret = DoSustain ();
|
||||
|
||||
if (!ret.empty ())
|
||||
std::cerr << "Watchdog: " << ret << std::endl;
|
||||
}
|
||||
|
||||
if (vm.count ("debug"))
|
||||
setDebugJournalSink (logs->get("Debug"));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user