Hanging requests...

Dec 4, 2016 at 5:28 PM
Edited Dec 4, 2016 at 6:18 PM
http_client::request is never ended on Windows 7 64 bit SP1.

My application is based on MFC.

I am using some simple http requests like below.
http_client_config conf;

            http_client client(m_url.c_str(), conf);
            http_request request(methods::POST);

            auto deleted = m_deleted;
            pplx::task<void> task = client.request(request).then([deleted](http_response response) -> pplx::task<json::value>
                if (*deleted)
                    return pplx::task<json::value>();

The request was never ended. (Even i set timeout.)

I have installed new OS on my test machine. and installed Redistribution package of VS 2015 in order to run my application. That is all what i did to test my app.

Of course the code are working correctly on my Developing Machine.

Is there any prerequisites of Casablanca? or did i miss something..?

I have got stuck in this problem and already checked whether the codes made any Exception or not.

No Exception. No Response forever.

Please give me a piece of advice.
Dec 5, 2016 at 7:14 AM
The reason of this.

I used pplx::task as like a thread on my app. Casablanca did not respond unless the task finished.

I am developing my app on Windows 10. In this case, It works correctly.

However, on the some testing machines , including Windows 7 64bit SP1, are not working like my question.

So, i changed the task to std::thread to resolve that.