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

Method StopDownload

src/HTTPDownload.cpp:113–119  ·  view source on GitHub ↗

Unlink from the request owner and cancel it. Fire-and-forget: the owner will self-destroy when wxWebRequest reports State_Cancelled on the main loop. We must NOT delete the owner here — doing so while a request is in flight leaves the wxWebRequest backend calling into a dead sink.

Source from the content-addressed store, hash-verified

111 // while a request is in flight leaves the wxWebRequest backend
112 // calling into a dead sink.
113 void StopDownload() {
114 if (m_owner) {
115 m_owner->DetachCompanion();
116 m_owner->Stop();
117 m_owner = NULL;
118 }
119 }
120
121 void OnBtnCancel(wxCommandEvent& WXUNUSED(evt)) {
122 AddLogLineN(_("HTTP download cancelled"));

Callers

nothing calls this directly

Calls 2

DetachCompanionMethod · 0.80
StopMethod · 0.45

Tested by

no test coverage detected