CCHttpClient -- halts when called destroyInstance() -- Android

CCHttpClient -- halts when called destroyInstance() -- Android
0.0 0



I am calling destroyInstance() but my game halts at this line
I dont have very much good idea of this multi threading in c++. I have to read it in detail

What I am currently doing is that I call too many calls of loading icons on my screen.
So what I want is that when user close that screen I want to invalidate all the request that were sent?

Any idea what should I do for that?

Abdul Wasay


I put more logs to check this out
I noticed the code run this part when destroyInstance() is called after the destructor of cchttpclient
// cleanup: if worker thread received quit signal, clean up un-completed request queue

Here there is line written

I put a log previous to this line and after this line, the log above pthread_exit is printed but the below one is not printed
the code cycle then goes to this function

void CCHttpClient::dispatchResponseCallbacks(float delta)

CCHttpResponse* response = NULL;
CCLog(“Wasay1:: In dispatch1”);
CCLog(“Wasay1:: In dispatch2”);


and the last log that is printed is CCLog(“Wasay1:: In dispatch1”);

this one CCLog(“Wasay1:: In dispatch2”); is not printed on console

May be I have explained well, by the way the device I am using is xperia neo sony ericsson


Thats right, i noticed this too, if you do destroyInstance() and try to getInstance()->send() doesn’t work again. It’s a bug.
This is happening in 2.1.4 version , crashes on this line 460: s_requestQueue->addObject(request);


Same issue here.