[x] I have verified that I am running the latest version of Nancy
[x] I have verified if the problem exist in both DEBUG and RELEASE mode
[x] I have searched open and closed issues to ensure it has not already been reported
Description
Call to
await Task.Delay(1000*seconds).ConfigureAwait(false);
seems to block
Steps to Reproduce
Download the attached VS2017 solution, restore NuGet packages. Start the application in VS. Open "localhost:8888/sleep/60. Open "localhost:8888/echo/hello". The call to hello will be processed after the call to sleep.
System Configuration
Nancy version: v2.0.0-clinteastwood
Nancy host
[x ] Nancy.Hosting.Self
Other Nancy packages and versions:
Environment (Operating system, version and so on): Windows 10
.NET Framework version: 4.7.1
Additional information:
Most probably I have configured something badly. Async is pretty important in self hosted Nancy since it is single threaded.
You are free to resuse the attached code as an example application.
nancy-async-test.zip
Prerequisites
DEBUG
andRELEASE
modeDescription
Call to
await Task.Delay(1000*seconds).ConfigureAwait(false);
seems to blockSteps to Reproduce
Download the attached VS2017 solution, restore NuGet packages. Start the application in VS. Open "localhost:8888/sleep/60. Open "localhost:8888/echo/hello". The call to hello will be processed after the call to sleep.
System Configuration