aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorMatt Corallo <git@bluematt.me>2016-12-24 14:34:20 -0500
committerMatt Corallo <git@bluematt.me>2017-01-13 10:34:37 -0800
commitd7c58ad514ee00db00589216166808258bc16b60 (patch)
tree9ada9b97140cb50aa139dff17046beec63cd0788 /src/net.h
parent8b66bf74e2a349e71eaa183af81fa63eaee76ad2 (diff)
Split CNode::cs_vSend: message processing and message sending
cs_vSend is used for two purposes - to lock the datastructures used to queue messages to place on the wire and to only call SendMessages once at a time per-node. I believe SendMessages used to access some of the vSendMsg stuff, but it doesn't anymore, so these locks do not need to be on the same mutex, and also make deadlocking much more likely.
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/net.h b/src/net.h
index 2baf82702c..aef3ef9a7d 100644
--- a/src/net.h
+++ b/src/net.h
@@ -618,6 +618,8 @@ public:
std::list<CNetMessage> vProcessMsg;
size_t nProcessQueueSize;
+ CCriticalSection cs_sendProcessing;
+
std::deque<CInv> vRecvGetData;
uint64_t nRecvBytes;
std::atomic<int> nRecvVersion;