mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-22 00:59:08 +01:00
fixed bug with loval destination shared between http and socks proxy
This commit is contained in:
parent
8a987af244
commit
f7a6d57855
1 changed files with 3 additions and 6 deletions
|
@ -345,12 +345,9 @@ namespace client
|
||||||
{
|
{
|
||||||
LogPrint (eLogWarning, "Clients: Local destination ", m_AddressBook.ToAddress(keys.GetPublic ()->GetIdentHash ()), " exists");
|
LogPrint (eLogWarning, "Clients: Local destination ", m_AddressBook.ToAddress(keys.GetPublic ()->GetIdentHash ()), " exists");
|
||||||
if (!it->second->IsRunning ())
|
if (!it->second->IsRunning ())
|
||||||
{
|
|
||||||
it->second->Start ();
|
it->second->Start ();
|
||||||
return it->second;
|
return it->second;
|
||||||
}
|
}
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
auto localDestination = std::make_shared<ClientDestination> (keys, isPublic, params);
|
auto localDestination = std::make_shared<ClientDestination> (keys, isPublic, params);
|
||||||
std::unique_lock<std::mutex> l(m_DestinationsMutex);
|
std::unique_lock<std::mutex> l(m_DestinationsMutex);
|
||||||
m_Destinations[keys.GetPublic ()->GetIdentHash ()] = localDestination;
|
m_Destinations[keys.GetPublic ()->GetIdentHash ()] = localDestination;
|
||||||
|
@ -719,7 +716,7 @@ namespace client
|
||||||
std::map<std::string, std::string> params;
|
std::map<std::string, std::string> params;
|
||||||
ReadI2CPOptionsFromConfig ("httpproxy.", params);
|
ReadI2CPOptionsFromConfig ("httpproxy.", params);
|
||||||
localDestination = CreateNewLocalDestination (keys, false, ¶ms);
|
localDestination = CreateNewLocalDestination (keys, false, ¶ms);
|
||||||
localDestination->Acquire ();
|
if (localDestination) localDestination->Acquire ();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
LogPrint(eLogError, "Clients: failed to load HTTP Proxy key");
|
LogPrint(eLogError, "Clients: failed to load HTTP Proxy key");
|
||||||
|
@ -758,7 +755,7 @@ namespace client
|
||||||
std::map<std::string, std::string> params;
|
std::map<std::string, std::string> params;
|
||||||
ReadI2CPOptionsFromConfig ("socksproxy.", params);
|
ReadI2CPOptionsFromConfig ("socksproxy.", params);
|
||||||
localDestination = CreateNewLocalDestination (keys, false, ¶ms);
|
localDestination = CreateNewLocalDestination (keys, false, ¶ms);
|
||||||
localDestination->Acquire ();
|
if (localDestination) localDestination->Acquire ();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
LogPrint(eLogError, "Clients: failed to load SOCKS Proxy key");
|
LogPrint(eLogError, "Clients: failed to load SOCKS Proxy key");
|
||||||
|
|
Loading…
Add table
Reference in a new issue