Moved logging to target functions rather than caller

This commit is contained in:
NanoAkron 2016-10-03 22:11:00 +01:00
parent 442bfd1600
commit 8ed0d72b12
No known key found for this signature in database
GPG key ID: 346A337AA2EA8B57
6 changed files with 31 additions and 21 deletions

View file

@ -69,12 +69,13 @@ public:
~t_protocol()
{
LOG_PRINT_L0("Deinitializing cryptonote_protocol...");
LOG_PRINT_L0("Stopping cryptonote protocol...");
try {
m_protocol.deinit();
m_protocol.set_p2p_endpoint(nullptr);
LOG_PRINT_L0("Cryptonote protocol stopped successfully");
} catch (...) {
LOG_PRINT_L0("Failed to deinitialize protocol...");
LOG_ERROR("Failed to stop cryptonote protocol!");
}
}
};