Browse Source

* correct shutdown of httpserver & socksproxy

pull/358/head
hagen 9 years ago
parent
commit
62cec2a31c
  1. 20
      ClientContext.cpp
  2. 8
      Daemon.cpp

20
ClientContext.cpp

@ -100,15 +100,19 @@ namespace client @@ -100,15 +100,19 @@ namespace client
void ClientContext::Stop ()
{
LogPrint(eLogInfo, "Clients: stopping HTTP Proxy");
m_HttpProxy->Stop();
delete m_HttpProxy;
m_HttpProxy = nullptr;
if (m_HttpProxy) {
LogPrint(eLogInfo, "Clients: stopping HTTP Proxy");
m_HttpProxy->Stop();
delete m_HttpProxy;
m_HttpProxy = nullptr;
}
LogPrint(eLogInfo, "Clients: stopping SOCKS Proxy");
m_SocksProxy->Stop();
delete m_SocksProxy;
m_SocksProxy = nullptr;
if (m_SocksProxy) {
LogPrint(eLogInfo, "Clients: stopping SOCKS Proxy");
m_SocksProxy->Stop();
delete m_SocksProxy;
m_SocksProxy = nullptr;
}
for (auto& it: m_ClientTunnels)
{

8
Daemon.cpp

@ -210,9 +210,11 @@ namespace i2p @@ -210,9 +210,11 @@ namespace i2p
i2p::transport::transports.Stop();
LogPrint(eLogInfo, "Daemon: stopping NetDB");
i2p::data::netdb.Stop();
LogPrint(eLogInfo, "Daemon: stopping HTTP Server");
d.httpServer->Stop();
d.httpServer = nullptr;
if (d.httpServer) {
LogPrint(eLogInfo, "Daemon: stopping HTTP Server");
d.httpServer->Stop();
d.httpServer = nullptr;
}
if (d.m_I2PControlService)
{
LogPrint(eLogInfo, "Daemon: stopping I2PControl");

Loading…
Cancel
Save