canvas::Image: abort http requests if image is destroyed.

This commit is contained in:
Thomas Geymayer
2014-06-05 17:25:12 +02:00
parent 7a65d42a4c
commit e302ad092e
3 changed files with 22 additions and 7 deletions
+3 -4
View File
@@ -304,7 +304,9 @@ void Request::setFailure(int code, const std::string& reason)
{
_responseStatus = code;
_responseReason = reason;
setReadyState(FAILED);
if( !isComplete() )
setReadyState(FAILED);
}
//------------------------------------------------------------------------------
@@ -346,9 +348,6 @@ void Request::abort()
//----------------------------------------------------------------------------
void Request::abort(const std::string& reason)
{
if( isComplete() )
return;
setFailure(-1, reason);
_willClose = true;
}