MCPcopy Create free account
hub / github.com/PurpleI2P/i2pd / stop

Method stop

daemon/Daemon.cpp:402–443  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

400 }
401
402 bool Daemon_Singleton::stop()
403 {
404 LogPrint(eLogInfo, "Daemon: Shutting down");
405 LogPrint(eLogInfo, "Daemon: Stopping Client");
406 i2p::client::context.Stop();
407 LogPrint(eLogInfo, "Daemon: Stopping Router context");
408 i2p::context.Stop();
409 LogPrint(eLogInfo, "Daemon: Stopping Tunnels");
410 i2p::tunnel::tunnels.Stop();
411
412 if (d.UPnP)
413 {
414 d.UPnP->Stop ();
415 d.UPnP = nullptr;
416 }
417
418 if (d.m_NTPSync)
419 {
420 d.m_NTPSync->Stop ();
421 d.m_NTPSync = nullptr;
422 }
423
424 LogPrint(eLogInfo, "Daemon: Stopping Transports");
425 i2p::transport::transports.Stop();
426 LogPrint(eLogInfo, "Daemon: Stopping NetDB");
427 i2p::data::netdb.Stop();
428 if (d.httpServer) {
429 LogPrint(eLogInfo, "Daemon: Stopping HTTP Server");
430 d.httpServer->Stop();
431 d.httpServer = nullptr;
432 }
433 if (d.m_I2PControlService)
434 {
435 LogPrint(eLogInfo, "Daemon: Stopping I2PControl");
436 d.m_I2PControlService->Stop ();
437 d.m_I2PControlService = nullptr;
438 }
439 i2p::crypto::TerminateCrypto ();
440 i2p::log::Logger().Stop();
441
442 return true;
443 }
444
445 static void ShowUptime (std::stringstream& s, int seconds)
446 {

Callers 7

StopMethod · 0.45
mainFunction · 0.45
StopMethod · 0.45
StopMethod · 0.45
StopMethod · 0.45
StopMethod · 0.45
StopIOServiceMethod · 0.45

Calls 3

LogPrintFunction · 0.85
TerminateCryptoFunction · 0.85
StopMethod · 0.45

Tested by

no test coverage detected