From 77210d60aee38e1823f879106faa5571e52a7294 Mon Sep 17 00:00:00 2001 From: lite3 Date: Thu, 19 Jun 2014 22:07:24 +0800 Subject: [PATCH] fix: can not create networkThread at second create HttpClient. --- cocos/network/HttpClient.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cocos/network/HttpClient.cpp b/cocos/network/HttpClient.cpp index 127b778b85..a1201463e3 100644 --- a/cocos/network/HttpClient.cpp +++ b/cocos/network/HttpClient.cpp @@ -545,10 +545,10 @@ bool HttpClient::lazyInitThreadSemphore() s_requestQueue = new Vector(); s_responseQueue = new Vector(); + s_need_quit = false; + auto t = std::thread(CC_CALLBACK_0(HttpClient::networkThread, this)); t.detach(); - - s_need_quit = false; } return true;