mirror of https://github.com/axmolengine/axmol.git
Merge pull request #5466 from andyque/bug3868
closed #3868. when singleton deleted, it should not dispatch callbacks. This PR resolves: Possible crash on repeat running between HttpClientTest, WebSocketTest, SocketIOTest.
This commit is contained in:
commit
ffb815d5e6
|
@ -214,7 +214,9 @@ void HttpClient::networkThread()
|
||||||
s_responseQueue->pushBack(response);
|
s_responseQueue->pushBack(response);
|
||||||
s_responseQueueMutex.unlock();
|
s_responseQueueMutex.unlock();
|
||||||
|
|
||||||
scheduler->performFunctionInCocosThread(CC_CALLBACK_0(HttpClient::dispatchResponseCallbacks, this));
|
if (nullptr != s_pHttpClient) {
|
||||||
|
scheduler->performFunctionInCocosThread(CC_CALLBACK_0(HttpClient::dispatchResponseCallbacks, this));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// cleanup: if worker thread received quit signal, clean up un-completed request queue
|
// cleanup: if worker thread received quit signal, clean up un-completed request queue
|
||||||
|
|
Loading…
Reference in New Issue