|
|
@ -1069,15 +1069,16 @@ void CConnman::ThreadSocketHandler() |
|
|
|
if (pnode->GetRefCount() <= 0) |
|
|
|
if (pnode->GetRefCount() <= 0) |
|
|
|
{ |
|
|
|
{ |
|
|
|
bool fDelete = false; |
|
|
|
bool fDelete = false; |
|
|
|
{ |
|
|
|
|
|
|
|
TRY_LOCK(pnode->cs_vSend, lockSend); |
|
|
|
|
|
|
|
if (lockSend) |
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
TRY_LOCK(pnode->cs_inventory, lockInv); |
|
|
|
TRY_LOCK(pnode->cs_inventory, lockInv); |
|
|
|
if (lockInv) |
|
|
|
if (lockInv) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
TRY_LOCK(pnode->cs_vSend, lockSend); |
|
|
|
|
|
|
|
if (lockSend) { |
|
|
|
fDelete = true; |
|
|
|
fDelete = true; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
if (fDelete) |
|
|
|
if (fDelete) |
|
|
|
{ |
|
|
|
{ |
|
|
|
vNodesDisconnected.remove(pnode); |
|
|
|
vNodesDisconnected.remove(pnode); |
|
|
|