mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-23 07:57:51 -05:00
make cancelling not call error callback
This commit is contained in:
parent
7ba832c9ee
commit
2540790ccb
1 changed files with 5 additions and 3 deletions
|
@ -357,7 +357,11 @@ SentAsyncWebRequest::Impl::Impl(SentAsyncWebRequest* self, AsyncWebRequest const
|
|||
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &code);
|
||||
if (res != CURLE_OK) {
|
||||
curl_easy_cleanup(curl);
|
||||
return this->error("Fetch failed: " + std::string(curl_easy_strerror(res)), code);
|
||||
if (m_cancelled) {
|
||||
return this->doCancel();
|
||||
} else {
|
||||
return this->error("Fetch failed: " + std::string(curl_easy_strerror(res)), code);
|
||||
}
|
||||
}
|
||||
if (code >= 400 && code < 600) {
|
||||
std::string response_str(ret.begin(), ret.end());
|
||||
|
@ -409,8 +413,6 @@ void SentAsyncWebRequest::Impl::doCancel() {
|
|||
l.lock();
|
||||
}
|
||||
});
|
||||
|
||||
this->error("Request cancelled", -1);
|
||||
}
|
||||
|
||||
void SentAsyncWebRequest::Impl::cancel() {
|
||||
|
|
Loading…
Reference in a new issue