mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
add LOCK() for proxy related data-structures
- fix #1560 by properly locking proxy related data-structures - update GetProxy() and introduce GetNameProxy() to be able to use a thread-safe local copy from proxyInfo and nameproxyInfo - update usage of GetProxy() all over the source to match the new behaviour, as it now fills a full proxyType object - rename GetNameProxy() into HaveNameProxy() to be more clear
This commit is contained in:
parent
0547b02af7
commit
81bbef2609
5 changed files with 77 additions and 49 deletions
|
|
@ -1185,7 +1185,7 @@ void ThreadDNSAddressSeed2(void* parg)
|
|||
printf("Loading addresses from DNS seeds (could take a while)\n");
|
||||
|
||||
for (unsigned int seed_idx = 0; seed_idx < ARRAYLEN(strDNSSeed); seed_idx++) {
|
||||
if (GetNameProxy()) {
|
||||
if (HaveNameProxy()) {
|
||||
AddOneShot(strDNSSeed[seed_idx][1]);
|
||||
} else {
|
||||
vector<CNetAddr> vaddr;
|
||||
|
|
@ -1529,7 +1529,7 @@ void ThreadOpenAddedConnections2(void* parg)
|
|||
if (mapArgs.count("-addnode") == 0)
|
||||
return;
|
||||
|
||||
if (GetNameProxy()) {
|
||||
if (HaveNameProxy()) {
|
||||
while(!fShutdown) {
|
||||
BOOST_FOREACH(string& strAddNode, mapMultiArgs["-addnode"]) {
|
||||
CAddress addr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue