Merge pull request #1168

10be903 Brackets to prevent premature return (NanoAkron)
fb1785a Brackets to ensure doesn't function prematurely return (NanoAkron)
8ed0d72 Moved logging to target functions rather than caller (NanoAkron)
442bfd1 Added messages at log level 2 to reflect deactivation procedure (NanoAkron)
This commit is contained in:
Riccardo Spagni 2016-10-04 11:41:13 +02:00
commit fa1d5efb5a
No known key found for this signature in database
GPG key ID: 55432DF31CCD4FCD
6 changed files with 35 additions and 17 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!");
}
}
};