aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/daemon.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-11-30 14:53:38 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-11-30 15:10:25 +0000
commitaba9a9c27777cd0649e9946566d87030f78d8bec (patch)
tree649d0b1d2c48dcaebb0c83b757bf52f16513dad5 /src/daemon/daemon.cpp
parentMerge pull request #4821 (diff)
downloadmonero-aba9a9c27777cd0649e9946566d87030f78d8bec.tar.xz
daemon: stop miner before we bring the whole thing down
This avoids the miner erroring out trying to submit blocks to a core that's already shut down (and avoids pegging the CPU while we're busy shutting down).
Diffstat (limited to '')
-rw-r--r--src/daemon/daemon.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/daemon/daemon.cpp b/src/daemon/daemon.cpp
index 49d6d49cf..85b8780f0 100644
--- a/src/daemon/daemon.cpp
+++ b/src/daemon/daemon.cpp
@@ -198,7 +198,6 @@ bool t_daemon::run(bool interactive)
for(auto& rpc : mp_internals->rpcs)
rpc->stop();
- mp_internals->core.get().get_miner().stop();
MGINFO("Node stopped.");
return true;
}
@@ -220,7 +219,6 @@ void t_daemon::stop()
{
throw std::runtime_error{"Can't stop stopped daemon"};
}
- mp_internals->core.get().get_miner().stop();
mp_internals->p2p.stop();
for(auto& rpc : mp_internals->rpcs)
rpc->stop();