From 10f4d96f93b6f70aa3887321b59d7a9d9a12b1e4 Mon Sep 17 00:00:00 2001 From: Andrew Stanton-Nurse Date: Mon, 10 Sep 2018 10:22:25 -0700 Subject: [PATCH] Fix sample snippet by adding async (#8480) Noticed that this sample snippet doesn't have the `async` keyword or return a task in the middleware func, so it won't compile as-is. Added `async` since it's the easiest way to do this. --- aspnetcore/signalr/hubcontext.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aspnetcore/signalr/hubcontext.md b/aspnetcore/signalr/hubcontext.md index 1b6ce0bbe6..a8ec41e8d2 100644 --- a/aspnetcore/signalr/hubcontext.md +++ b/aspnetcore/signalr/hubcontext.md @@ -38,7 +38,7 @@ Now, with access to an instance of `IHubContext`, you can call hub methods as if Access the `IHubContext` within the middleware pipeline like so: ```csharp -app.Use(next => (context) => +app.Use(next => async (context) => { var hubContext = context.RequestServices .GetRequiredService>();