aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/net.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/net.cpp b/src/net.cpp
index df88b12c76..5cddc6f44d 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1070,12 +1070,13 @@ void CConnman::ThreadSocketHandler()
{
bool fDelete = false;
{
- TRY_LOCK(pnode->cs_vSend, lockSend);
- if (lockSend)
+ TRY_LOCK(pnode->cs_inventory, lockInv);
+ if (lockInv)
{
- TRY_LOCK(pnode->cs_inventory, lockInv);
- if (lockInv)
- fDelete = true;
+ TRY_LOCK(pnode->cs_vSend, lockSend);
+ if (lockSend) {
+ fDelete = true;
+ }
}
}
if (fDelete)