Go to file
moozzyk 23375c911b Fixes a race where wrong task could be awaited in channel completion
We had a startTask we would await in DisposeAsync and channel completion continuation. This task would be initially set to a completed task and then once StartAsync was invoked it would be replaced with the actual task representing StartAsyncInternal. However if a transport failed immediately after starting the channel completion continuation could have been called before the StartAsyncInternal method completed. In this case we would await the inital completed task and then very likely would fail trying to await _receiveLoop task because it wouldn't necessarily be set.
The fix is to use TaskCompletionSource so we don't try to swap tasks. We need to do some additional state checks because:
- the TaskCompletionSource task may never be completed (e.g. DisposeAsync is being called without starting the connection)
- TaskCompletionSource allows setting the result only once and we should not return its task more than once (e.g. calling StartAsync after connection was successfully started and stopped)

Fixes #304
2017-03-16 13:45:18 -07:00
build Consolidate dependency versions to one file 2017-03-15 19:34:12 -07:00
client-ts Consolidate dependency versions to one file 2017-03-15 19:34:12 -07:00
samples Consolidate dependency versions to one file 2017-03-15 19:34:12 -07:00
specs
src Fixes a race where wrong task could be awaited in channel completion 2017-03-16 13:45:18 -07:00
test Moving XUnitLoggerProvider to Common location 2017-03-16 13:45:18 -07:00
typings
.gitattributes
.gitignore
.travis.yml
CONTRIBUTING.md
LICENSE.txt
NuGet.config
NuGetPackageVerifier.json
README.md
SignalR.sln Moving XUnitLoggerProvider to Common location 2017-03-16 13:45:18 -07:00
appveyor.yml
build.cmd
build.ps1
build.sh
version.props

README.md

ASP.NET Core SignalR

AppVeyor: AppVeyor

Travis: Travis

ASP.NET Core SignalR is a new library for ASP.NET Core developers that makes it incredibly simple to add real-time web functionality to your applications. What is "real-time web" functionality? It's the ability to have your server-side code push content to the connected clients as it happens, in real-time.

You can watch an introductory presentation here - Introducing ASP.NET Core Sockets.

This project is part of ASP.NET Core. You can find samples, documentation and getting started instructions for ASP.NET Core at the Home repo.

Note To build the project locally at this time you will need the TypeScript Compiler on your path.