diff options
| author | Cory Fields <[email protected]> | 2016-04-18 15:58:19 -0400 |
|---|---|---|
| committer | Cory Fields <[email protected]> | 2016-05-05 13:22:25 -0400 |
| commit | cca221fd211f63b338bd90afc505bd4a22a01d5d (patch) | |
| tree | 77251487128281ca0b18042bd30828f02a6edf73 /src/rpc/net.cpp | |
| parent | net: use the exposed GetNodeSignals() rather than g_signals directly (diff) | |
| download | discoin-cca221fd211f63b338bd90afc505bd4a22a01d5d.tar.xz discoin-cca221fd211f63b338bd90afc505bd4a22a01d5d.zip | |
net: Drop CNodeRef for AttemptToEvictConnection
Locking for each operation here is unnecessary, and solves the wrong problem.
Additionally, it introduces a problem when cs_vNodes is held in an owning
class, to which invididual CNodeRefs won't have access.
These should be weak pointers anyway, once vNodes contain shared pointers.
Rather than using a refcounting class, use a 3-step process instead.
1. Lock vNodes long enough to snapshot the fields necessary for comparing
2. Unlock and do the comparison
3. Re-lock and mark the resulting node for disconnection if it still exists
Diffstat (limited to 'src/rpc/net.cpp')
0 files changed, 0 insertions, 0 deletions