diff options
| author | Wladimir J. van der Laan <[email protected]> | 2015-07-23 18:43:37 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2015-07-23 18:45:26 +0200 |
| commit | d2464dfee928cdd4194516e9bc8b541c22972ab9 (patch) | |
| tree | 19021d0c8d5bf2cd672b4e127e93e489606e98e7 /src/net.cpp | |
| parent | Merge pull request #5515 (diff) | |
| parent | locking: add a quick example of GUARDED_BY (diff) | |
| download | discoin-d2464dfee928cdd4194516e9bc8b541c22972ab9.tar.xz discoin-d2464dfee928cdd4194516e9bc8b541c22972ab9.zip | |
Merge pull request #6287
a794284 locking: add a quick example of GUARDED_BY (Cory Fields)
2b890dd locking: fix a few small issues uncovered by -Wthread-safety (Cory Fields)
cd27bba locking: teach Clang's -Wthread-safety to cope with our scoped lock macros (Cory Fields)
Diffstat (limited to 'src/net.cpp')
| -rw-r--r-- | src/net.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/net.cpp b/src/net.cpp index 3d369c7dd..5cb6527c9 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -2183,8 +2183,10 @@ void CNode::EndMessage() UNLOCK_FUNCTION(cs_vSend) Fuzz(GetArg("-fuzzmessagestest", 10)); if (ssSend.size() == 0) + { + LEAVE_CRITICAL_SECTION(cs_vSend); return; - + } // Set the size unsigned int nSize = ssSend.size() - CMessageHeader::HEADER_SIZE; WriteLE32((uint8_t*)&ssSend[CMessageHeader::MESSAGE_SIZE_OFFSET], nSize); |