diff options
author | Vasil Dimov <vd@FreeBSD.org> | 2021-04-28 18:29:32 +0200 |
---|---|---|
committer | Vasil Dimov <vd@FreeBSD.org> | 2021-11-18 13:38:42 +0100 |
commit | 664ac22c5379db65757fc3aab91fff8765683e7f (patch) | |
tree | 3198887177c5920ef47f4d9c3d1effc00af6da31 /doc/build-netbsd.md | |
parent | 75e8bf55f5a014faada7712a9640dc35e8c86f15 (diff) |
net: keep reference to each node during socket wait
Create the snapshot of `CConnman::vNodes` to operate on earlier in
`CConnman::SocketHandler()`, before calling `CConnman::SocketEvents()`
and pass the `vNodes` copy from the snapshot to `SocketEvents()`.
This will keep the refcount of each node incremented during
`SocketEvents()` so that the `CNode` object is not destroyed before
`SocketEvents()` has finished.
Currently in `SocketEvents()` we only remember file descriptor numbers
(when not holding `CConnman::cs_vNodes`) which is safe, but we will
change this to remember pointers to `CNode::m_sock`.
Diffstat (limited to 'doc/build-netbsd.md')
0 files changed, 0 insertions, 0 deletions