From aedd548c3be0c7aaf09fbdf3a649a4ac9a7e8856 Mon Sep 17 00:00:00 2001 From: Ben Adams Date: Sun, 19 Jul 2015 15:32:37 +0100 Subject: [PATCH] Fix sample perf (Option 1) No need to await just return Task --- samples/SampleApp/Startup.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/SampleApp/Startup.cs b/samples/SampleApp/Startup.cs index 5f81cbefcc..edc92abac0 100644 --- a/samples/SampleApp/Startup.cs +++ b/samples/SampleApp/Startup.cs @@ -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"); }); } } -} \ No newline at end of file +}