MCPcopy Create free account
hub / github.com/amule-project/amule / Stop

Method Stop

src/HTTPDownload.cpp:440–452  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

438
439
440void CHTTPDownloadThread::Stop()
441{
442 if (m_request.IsOk() && !m_finishPosted) {
443 // Fire-and-forget: wxWebRequest will schedule a State_Cancelled
444 // event on the main loop. Our OnStateEvent will run
445 // FinishAndDestroy at that point.
446 m_request.Cancel();
447 } else if (!m_finishPosted) {
448 // Request never got off the ground (e.g. invalid URL, or Stop()
449 // called before Start() had a chance). Finish synchronously.
450 FinishAndDestroy(HTTP_Error);
451 }
452}
453
454
455void CHTTPDownloadThread::StopAll()

Callers 2

StopDownloadMethod · 0.45
StopAllMethod · 0.45

Calls 2

CancelMethod · 0.80
IsOkMethod · 0.45

Tested by

no test coverage detected