SignalR stream sample fix. Link to sample updated in related article. (#7237)

- Fixed sample for SignalR stream usage.
- Link to this code sample updated as well, because of 404 error when opening it from aspnetcore/signalr/streaming.md
pull/7242/head
Nick Kotov 2018-06-22 18:08:23 +03:00 committed by Scott Addie
parent abf707ed00
commit 2aa982e164
2 changed files with 4 additions and 4 deletions

View File

@ -24,7 +24,7 @@ A hub method automatically becomes a streaming hub method when it returns a `Cha
> [!NOTE]
> Write to the `ChannelReader` on a background thread and return the `ChannelReader` as soon as possible. Other hub invocations will be blocked until a `ChannelReader` is returned.
[!code-csharp[Streaming hub method](streaming/sample/hubs/streamhub.cs?range=10-34)]
[!code-csharp[Streaming hub method](streaming/sample/Hubs/StreamHub.cs?range=10-34)]
## .NET client

View File

@ -25,11 +25,11 @@ namespace SignalRChat.Hubs
{
for (var i = 0; i < count; i++)
{
await channel.Writer.WriteAsync(i);
await writer.WriteAsync(i);
await Task.Delay(delay);
}
channel.Writer.TryComplete();
writer.TryComplete();
}
}
}