Commit Graph

6 Commits

Author SHA1 Message Date
Chris R 0edd62339e React to IHostedService namespace change 2017-04-26 14:37:58 -07:00
David Fowler 934f6a70d1 Various fixes in HttpConnectionDispatcher (#151)
- The connection state object is manipulated by multiple parties in a non thread safe way. This change introduces a semaphore that should be used by anyone updating or reading the connection state. 
- Handle cases where there's an active request for a connection id and another incoming request for the same connection id, sse and websockets 409 and long polling kicks out the previous connection (https://github.com/aspnet/SignalR/issues/27 and https://github.com/aspnet/SignalR/issues/4)
- Handle requests being processed for disposed connections. There was a race where the background thread could remove and clean up the connection while it was about to be processed.
- Synchronize between the background scanning thread and the request threads when updating the connection state.
- Added `DisposeAndRemoveAsync` to the connection manager that handles`DisposeAsync` throwing and properly removes connections from connection tracking.
- Added Start to ConnectionManager so that testing is easier (background timer doesn't kick in unless start is called).
- Added RequestId to connection state for easier debugging and correlation (can easily see which request is currently processing the logical connection).
- Added tests
2017-01-25 22:27:55 +00:00
Mikael Mengistu 23c0522db9 Added missing copyright and license headers 2016-12-19 14:30:43 -05:00
David Fowler df9057a6f7 Revert "Revert "React to hosting changes""
This reverts commit 12649b19bf.
2016-12-14 00:01:35 -08:00
David Fowler 12649b19bf Revert "React to hosting changes"
This reverts commit f48bd8d185.
2016-12-13 23:56:10 -08:00
David Fowler f48bd8d185 React to hosting changes 2016-12-13 23:03:20 -08:00