put request param in lambda in HttpClient::networkThreadAlone

This commit is contained in:
lite3 2014-06-26 02:03:53 +08:00
parent e3eb5aeddd
commit 07245ebf6e
1 changed files with 1 additions and 2 deletions

View File

@ -181,8 +181,7 @@ void HttpClient::networkThreadAlone(HttpRequest* request)
processResponse(response, errorBuffer);
auto scheduler = Director::getInstance()->getScheduler();
scheduler->performFunctionInCocosThread([response]{
auto request = response->getHttpRequest();
scheduler->performFunctionInCocosThread([response, request]{
const ccHttpRequestCallback& callback = request->getCallback();
Ref* pTarget = request->getTarget();
SEL_HttpResponse pSelector = request->getSelector();