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
Comments: Hi Ruslan, Ok it sounds like this really is the same bug then. I'm closing this as a duplicate. Thanks, Steve
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
Comments: Hi Ruslan, Ok it sounds like this really is the same bug then. I'm closing this as a duplicate. Thanks, Steve