Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DRAFT: Require a message on "Application::signalStop" #5255

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/test/jtx/impl/Env.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ Env::AppBundle::~AppBundle()
if (app)
{
app->getJobQueue().rendezvous();
app->signalStop();
app->signalStop("~AppBundle");
}
if (thread.joinable())
thread.join();
Expand Down
8 changes: 4 additions & 4 deletions src/xrpld/app/main/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ class ApplicationImp : public Application, public BasicApp
config_->CONFIG_DIR),
*this,
logs_->journal("PerfLog"),
[this] { signalStop(); }))
[this] { signalStop("PerfLog"); }))

, m_txMaster(*this)

Expand Down Expand Up @@ -507,7 +507,7 @@ class ApplicationImp : public Application, public BasicApp
void
run() override;
void
signalStop(std::string msg = "") override;
signalStop(std::string msg) override;
bool
checkSigs() const override;
void
Expand Down Expand Up @@ -979,7 +979,7 @@ class ApplicationImp : public Application, public BasicApp
if (!config_->standalone() &&
!getRelationalDatabase().transactionDbHasSpace(*config_))
{
signalStop();
signalStop("Out of transaction DB space");
}

// VFALCO NOTE Does the order of calls matter?
Expand Down Expand Up @@ -1195,7 +1195,7 @@ ApplicationImp::setup(boost::program_options::variables_map const& cmdline)
JLOG(m_journal.info()) << "Received signal " << signum;

if (signum == SIGTERM || signum == SIGINT)
signalStop();
signalStop("Signal: " + to_string(signum));
});

auto debug_log = config_->getDebugLogFile();
Expand Down
2 changes: 1 addition & 1 deletion src/xrpld/app/main/Application.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class Application : public beast::PropertyStream::Source
virtual void
run() = 0;
virtual void
signalStop(std::string msg = "") = 0;
signalStop(std::string msg) = 0;
virtual bool
checkSigs() const = 0;
virtual void
Expand Down
2 changes: 1 addition & 1 deletion src/xrpld/rpc/handlers/Stop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ struct JsonContext;
Json::Value
doStop(RPC::JsonContext& context)
{
context.app.signalStop();
context.app.signalStop("RPC");
return RPC::makeObjectValue(systemName() + " server stopping");
}

Expand Down
Loading