aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorj-berman <justinberman@protonmail.com>2025-11-07 16:00:57 -0800
committerj-berman <justinberman@protonmail.com>2025-11-11 10:44:26 -0800
commita83a46d60059a063ec953ba15f4cdcc2b3874440 (patch)
treea152e55dfff1e3b4a84dd83ae8648d15e189a21d /src
parent3cc9d65c9374b541e64320052c933184944375ea (diff)
downloadmonzero-core-a83a46d60059a063ec953ba15f4cdcc2b3874440.tar.gz
monzero-core-a83a46d60059a063ec953ba15f4cdcc2b3874440.tar.xz
monzero-core-a83a46d60059a063ec953ba15f4cdcc2b3874440.zip
Fix logging deadlock
Diffstat (limited to 'src')
-rw-r--r--src/cryptonote_protocol/cryptonote_protocol_handler.inl7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler.inl b/src/cryptonote_protocol/cryptonote_protocol_handler.inl
index 2a6ad658d..1686394c5 100644
--- a/src/cryptonote_protocol/cryptonote_protocol_handler.inl
+++ b/src/cryptonote_protocol/cryptonote_protocol_handler.inl
@@ -44,6 +44,7 @@
#include "net/network_throttle-detail.hpp"
#include "common/pruning.h"
#include "common/util.h"
+#include "misc_log_ex.h"
#undef MONERO_DEFAULT_LOG_CATEGORY
#define MONERO_DEFAULT_LOG_CATEGORY "net.cn"
@@ -55,8 +56,10 @@
const char *cat = "net.p2p.msg"; \
if (ELPP->vRegistry()->allowed(level, cat)) { \
init; \
- if (test) \
- el::base::Writer(level, el::Color::Default, __FILE__, __LINE__, ELPP_FUNC, el::base::DispatchAction::NormalLog).construct(cat) << x; \
+ if (test) { \
+ LOG_TO_STRING(x); \
+ el::base::Writer(level, el::Color::Default, __FILE__, __LINE__, ELPP_FUNC, el::base::DispatchAction::NormalLog).construct(cat) << str; \
+ } \
} \
} while(0)