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

Method Stop

daemon/I2PControl.cpp:118–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116 }
117
118 void I2PControlService::Stop ()
119 {
120 if (m_IsRunning)
121 {
122 m_IsRunning = false;
123 if (m_Acceptor) m_Acceptor->cancel ();
124#if defined(BOOST_ASIO_HAS_LOCAL_SOCKETS)
125 if (m_LocalAcceptor)
126 {
127 auto path = m_LocalAcceptor->local_endpoint().path();
128 m_LocalAcceptor->cancel ();
129 std::remove (path.c_str ());
130 }
131#endif
132 m_Service.stop ();
133 if (m_Thread)
134 {
135 m_Thread->join ();
136 m_Thread = nullptr;
137 }
138 }
139 }
140
141 void I2PControlService::Run ()
142 {

Callers

nothing calls this directly

Calls 1

stopMethod · 0.45

Tested by

no test coverage detected