diff options
| author | lmanners <[email protected]> | 2018-05-10 18:23:22 +0200 |
|---|---|---|
| committer | lmanners <[email protected]> | 2018-06-21 19:24:48 +0200 |
| commit | 793290f940a9af18d4f0292a263d976a066dff65 (patch) | |
| tree | 7301e54c117bac96e57eb7027d2b56e61656a265 /src/httpserver.cpp | |
| parent | Merge #13192: [tests] Fixed intermittent failure in p2p_sendheaders.py. (diff) | |
| download | discoin-793290f940a9af18d4f0292a263d976a066dff65.tar.xz discoin-793290f940a9af18d4f0292a263d976a066dff65.zip | |
Net: Fixed a race condition when disabling the network.
This change addresses a race condition where setnetworkactive=false wouldn't always disconnect all peers.
Before this change, the following could happen:
1. Thread A -- Begins connecting to a node.
2. Thread B -- Sets kNetworkActive=false and disconnects connected nodes.
3. Thread A -- Finishes connecting and adds node to list of connected nodes.
The node that was connected from Thread A remains connected and active,
even though kNetworkActive=false.
To fix the race, disconnections when kNetworkActive=false are now handled in the main network loop.
fixes #13038
Diffstat (limited to 'src/httpserver.cpp')
0 files changed, 0 insertions, 0 deletions