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

Method run

daemon/UnixDaemon.cpp:222–238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

220 }
221
222 void DaemonUnix::run ()
223 {
224 i2p::util::SetThreadName ("i2pd-daemon");
225 while (running)
226 {
227 std::this_thread::sleep_for (std::chrono::seconds(1));
228 if (gracefulShutdownInterval)
229 {
230 gracefulShutdownInterval--; // - 1 second
231 if (gracefulShutdownInterval <= 0 || i2p::tunnel::tunnels.CountTransitTunnels() <= 0)
232 {
233 LogPrint(eLogInfo, "Graceful shutdown");
234 return;
235 }
236 }
237 }
238 }
239 }
240}
241#endif

Callers 4

RunMethod · 0.45
mainFunction · 0.45
RunMethod · 0.45
RunMethod · 0.45

Calls 3

SetThreadNameFunction · 0.85
LogPrintFunction · 0.85
CountTransitTunnelsMethod · 0.80

Tested by

no test coverage detected