mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-21 16:49:10 +01:00
fixed crash on termination if proxies were excluded
This commit is contained in:
parent
ef6028e933
commit
81b72d5481
1 changed files with 14 additions and 8 deletions
|
@ -99,16 +99,22 @@ namespace client
|
||||||
}
|
}
|
||||||
|
|
||||||
void ClientContext::Stop ()
|
void ClientContext::Stop ()
|
||||||
|
{
|
||||||
|
if (m_HttpProxy)
|
||||||
{
|
{
|
||||||
LogPrint(eLogInfo, "Clients: stopping HTTP Proxy");
|
LogPrint(eLogInfo, "Clients: stopping HTTP Proxy");
|
||||||
m_HttpProxy->Stop();
|
m_HttpProxy->Stop();
|
||||||
delete m_HttpProxy;
|
delete m_HttpProxy;
|
||||||
m_HttpProxy = nullptr;
|
m_HttpProxy = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_SocksProxy)
|
||||||
|
{
|
||||||
LogPrint(eLogInfo, "Clients: stopping SOCKS Proxy");
|
LogPrint(eLogInfo, "Clients: stopping SOCKS Proxy");
|
||||||
m_SocksProxy->Stop();
|
m_SocksProxy->Stop();
|
||||||
delete m_SocksProxy;
|
delete m_SocksProxy;
|
||||||
m_SocksProxy = nullptr;
|
m_SocksProxy = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
for (auto& it: m_ClientTunnels)
|
for (auto& it: m_ClientTunnels)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue