Quantcast
Channel: WE MOVED to github.com/microsoft/cpprestsdk. This site is not monitored!
Viewing all articles
Browse latest Browse all 4845

Edited Issue: http_listener hangs on open() if pplx task is created in parallel on Win Server 20012 R2 [306]

$
0
0
http_listener.open() simply hangs if I pplx::create_task() {Sleep(forewer);} before hand.
If I first start listener and then launch the task, then all incoming http requests will hang.

This repros 100% on Windows 2012 R2 in Azure (Azure provided image), however it it doesn't repro on Win8.1 non-virtual machine. Win 8.1 non-virtual works just fine, but server hangs.
I use cpprest120d_2_2.dll
Code:
try
{
pplx::create_task([]
{
Sleep(1000000);
});

std::wcout << L"Launching" << std::endl;

listener
.open()
.then([&listener](){std::wcout << L"Start to listen"<<std::endl ; })
.wait();


while (true){ Sleep(1000); }
}
catch (exception const & e)
{
wcout << e.what() << endl;
}

otuput:

httpsample.exe localhost --c
url: http://localhost:9575/restdemo
Launching

// hangs right here





Viewing all articles
Browse latest Browse all 4845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>