aboutsummaryrefslogtreecommitdiff
path: root/src/config
diff options
context:
space:
mode:
authorVasil Dimov <vd@FreeBSD.org>2021-04-22 11:06:13 +0200
committerVasil Dimov <vd@FreeBSD.org>2021-04-22 11:06:13 +0200
commit9096b13a4764873511b65f32a005ce4738b0d81c (patch)
tree638257e9f2e7cb6ea8add4b8aa12409da1cb5604 /src/config
parente7776e20ed0ddf41d15b3d2df87a92ea6666226c (diff)
net: remove unnecessary check of CNode::cs_vSend
It is not possible to have a node in `CConnman::vNodesDisconnected` and its reference count to be incremented - all `CNode::AddRef()` are done either before the node is added to `CConnman::vNodes` or while holding `CConnman::cs_vNodes` and the object being in `CConnman::vNodes`. So, the object being in `CConnman::vNodesDisconnected` and its reference count being zero means that it is not and will not start to be used by other threads. So, the lock of `CNode::cs_vSend` in `CConnman::DisconnectNodes()` will always succeed and is not necessary. Indeed all locks of `CNode::cs_vSend` are done either when the reference count is >0 or under the protection of `CConnman::cs_vNodes` and the node being in `CConnman::vNodes`.
Diffstat (limited to 'src/config')
0 files changed, 0 insertions, 0 deletions