daemon: fix crash exiting with ^C

We need to stop the p2p layer, which causes the rest to shutdown
gracefully. Hitting ^C was still going through another path.
This commit is contained in:
moneromooo-monero 2015-12-13 23:56:02 +00:00
parent 3a4db6346b
commit fefc0b5556
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3

View file

@ -114,7 +114,7 @@ bool t_daemon::run(bool interactive)
{
throw std::runtime_error{"Can't run stopped daemon"};
}
tools::signal_handler::install(std::bind(&daemonize::t_daemon::stop, this));
tools::signal_handler::install(std::bind(&daemonize::t_daemon::stop_p2p, this));
try
{