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

Method Stop

Win32/Win32Service.cpp:149–168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147}
148
149void I2PService::Stop()
150{
151 DWORD dwOriginalState = m_status.dwCurrentState;
152 try
153 {
154 SetServiceStatus(SERVICE_STOP_PENDING);
155 OnStop();
156 SetServiceStatus(SERVICE_STOPPED);
157 }
158 catch (DWORD dwError)
159 {
160 LogPrint(eLogInfo, "Win32Service: Stop error: ", dwError);
161 SetServiceStatus(dwOriginalState);
162 }
163 catch (...)
164 {
165 LogPrint(eLogCritical, "Win32Service: Failed to stop: ", EVENTLOG_ERROR_TYPE);
166 SetServiceStatus(dwOriginalState);
167 }
168}
169
170void I2PService::OnStop()
171{

Callers 1

ServiceCtrlHandlerMethod · 0.45

Calls 1

LogPrintFunction · 0.85

Tested by

no test coverage detected