| 182 | } |
| 183 | |
| 184 | void I2PService::Pause() |
| 185 | { |
| 186 | try |
| 187 | { |
| 188 | SetServiceStatus(SERVICE_PAUSE_PENDING); |
| 189 | OnPause(); |
| 190 | SetServiceStatus(SERVICE_PAUSED); |
| 191 | } |
| 192 | catch (DWORD dwError) |
| 193 | { |
| 194 | LogPrint(eLogCritical, "Win32Service: Pause error: ", dwError); |
| 195 | SetServiceStatus(SERVICE_RUNNING); |
| 196 | } |
| 197 | catch (...) |
| 198 | { |
| 199 | LogPrint(eLogCritical, "Win32Service: Failed to pause: ", EVENTLOG_ERROR_TYPE); |
| 200 | SetServiceStatus(SERVICE_RUNNING); |
| 201 | } |
| 202 | } |
| 203 | |
| 204 | void I2PService::OnPause() |
| 205 | { |
no test coverage detected