This repository has been archived by the owner on Dec 18, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 446
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 (#27 and #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
- Loading branch information
Showing
12 changed files
with
462 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.