Fix sample perf (Option 1)
No need to await just return Task
This commit is contained in:
parent
93477efb41
commit
aedd548c3b
|
|
@ -11,7 +11,7 @@ namespace SampleApp
|
|||
{
|
||||
public void Configure(IApplicationBuilder app)
|
||||
{
|
||||
app.Run(async context =>
|
||||
app.Run(context =>
|
||||
{
|
||||
Console.WriteLine("{0} {1}{2}{3}",
|
||||
context.Request.Method,
|
||||
|
|
@ -21,8 +21,8 @@ namespace SampleApp
|
|||
|
||||
context.Response.ContentLength = 11;
|
||||
context.Response.ContentType = "text/plain";
|
||||
await context.Response.WriteAsync("Hello world");
|
||||
return context.Response.WriteAsync("Hello world");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue