Commit Graph

63 Commits

Author SHA1 Message Date
David Fowler 5e7f63b096
Make un-graceful shutdown a bit more graceful (#2748)
* Make un-graceful shutdown a bit more graceful
- Change how graceful shutdown is done to ensure there are no errors on shutdown.
- Avoid closing pipes from under other components that own those pipes.
- Close the application output so that the application's read loop ends gracefully. For websockets, we cancel the token, for other transports, we close the output directly.
2018-08-07 21:39:09 -07:00
BrennanConroy e403de7fbf
Solve LongPolling races by moving Cts disposal to connection disposal (#2731) 2018-08-06 19:17:29 -07:00
BrennanConroy 810c7cf9ad
Fix ODE race with cancellationtokensource (#2721) 2018-08-02 15:24:26 -07:00
BrennanConroy c8eedb3540
Fix race when connection is canceled and new poll comes in (#2697) 2018-07-31 16:36:54 -07:00
BrennanConroy 3d6e1e69fd
Close LongPolling connection on poll exception (#2701) 2018-07-31 09:52:10 -07:00
James Newton-King 8d680db112
Remove scanning connections log messages (#2397) 2018-05-30 15:29:46 +12:00
Dylan Dmitri Gray 736b7f5042
Client pings server on interval (#2309) 2018-05-23 13:53:23 -07:00
James Newton-King 96bbe70cd8
Handle incoming HTTP requests being canceled gracefully (#2314) 2018-05-19 13:32:05 +12:00
BrennanConroy 32cee74a0c
Generate baselines and enable Api check (#2304) 2018-05-17 15:21:13 -07:00
James Newton-King db33d593f0
Gracefully handle disposing while writing (#2180) 2018-05-09 17:57:56 -07:00
BrennanConroy f09b0e13d9
Upgrade to netcoreapp2.2 and remove netcoreapp2.0 testing (#2221) 2018-05-09 09:59:02 -07:00
James Newton-King 3e906fb64a
Minor API cleanup (#2147) 2018-05-01 17:51:08 -07:00
James Newton-King 295801ac50
XML documentation (#2106) 2018-05-01 16:08:09 -07:00
Andrew Stanton-Nurse 47eafca4d8
CancellationToken EVERYWHERE (#2101) 2018-04-20 16:21:51 -07:00
BrennanConroy 9101ab636b
Always check for WebSockets close (#2100) 2018-04-20 08:21:04 -07:00
BrennanConroy e9937ffb66
Split lock into WriteLock and StateLock to prevent deadlocks and unneeded lock contention (#2081) 2018-04-18 17:44:05 -07:00
James Newton-King 8985fee4b5
Merge 2018-04-17 20:39:19 +12:00
David Fowler 05d6bbb782
Flush first long poll immediately (#2032)
There was a race condition between the first poll and any other http request that was sent. 
In particular, if you called StartAsync then StopAsync it was possible for the delete to happen before the poll started leading to 400 errors. This change fixes that by making the very first poll
return immediately so that the client can use that to determine if there was an error connecting.
2018-04-17 00:49:26 -07:00
Andrew Stanton-Nurse c05c5a6b2a
React to aspnet/KestrelHttpServer#2496: make IConnectionInherentKeepAliveFeature a boolean feature (#2041) 2018-04-16 11:34:12 -07:00
James Newton-King a17320221e
Derp 2018-04-16 10:43:06 +12:00
James Newton-King 62f14054eb
Capture and log prematurely closed connections 2018-04-16 10:41:35 +12:00
James Newton-King f8e641d007
Merge 2018-04-15 19:21:07 +12:00
James Newton-King 725bb33949
Lazy initialize HttpConnectionContext.Items (#2027) 2018-04-15 19:06:13 +12:00
James Newton-King 9d033aa9f9
Blah 2018-04-15 18:16:23 +12:00
James Newton-King c835288e84
Suppress web socket closing without handshake 2018-04-15 17:51:31 +12:00
David Fowler 0f8485cafc
Renamed class to match the file (#2019) 2018-04-14 04:08:26 -07:00
James Newton-King e4d0f2980e
Microsoft.AspNetCore.SignalR.Client refactor (#2000) 2018-04-14 21:09:41 +12:00
Andrew Stanton-Nurse c7f7f36210
API Review for Http.Connections (#2010) 2018-04-13 16:35:07 -07:00
BrennanConroy 021356bf27
Internalize classes in Http.Connections (#2013) 2018-04-13 14:57:37 -07:00
David Fowler 83dec1093a
Fixed flaky longpolling tests (#1993)
- Wait for disposal and removal of the connection
2018-04-13 00:42:31 -07:00
Andrew Stanton-Nurse 24328b8e88
fix #1281 by adding support for DELETE endpoint on server (#1925) 2018-04-12 12:39:08 -07:00
David Fowler 8b1a7e9199
API review feedback (#1974)
- Remove SetHttpContext
- Remove HttpContextFeature
- Add and implement IHttpTransportFeature on HttpConnectionContext
- Remove ConnectionMetadataNames
2018-04-12 03:50:14 -07:00
James Newton-King d4773e831c
Set default transport and application buffer sizes (#1964) 2018-04-12 18:23:00 +12:00
James Newton-King 7563ccae20
Always use TaskCreationOptions.RunContinuationsAsynchronously (#1966) 2018-04-12 18:21:20 +12:00
David Fowler 3c8c8ea8e1
React to Kestrel changes (#1969) 2018-04-11 20:29:17 -07:00
David Fowler 8cc851ff9b
Clean up timer code with custom awaitable (#1935)
- Gets rid of locks by using an event loop
2018-04-11 10:39:29 -07:00
David Fowler cb5bba36fc
Get off the event loop before dispatch (#1952) 2018-04-11 10:39:09 -07:00
James Newton-King b30c2fecbf
SSE formatting refactor (#1916) 2018-04-11 17:13:15 +12:00
Mikael Mengistu 13f7981010
Rename Callback to Configure in UseConnections (#1939) 2018-04-11 00:08:22 +00:00
James Newton-King 6bc2ebb4c5
Use invariant culture and ordinal comparisons (#1928) 2018-04-10 16:52:19 +12:00
David Fowler 01089da84d
Use in for ReadOnlySequence (#1900) 2018-04-09 09:29:27 -07:00
Ben Adams 406d8f9a81 readonly readonly structs (#1908) 2018-04-08 23:28:37 -07:00
James Newton-King bd78785f8d
Minor DefaultHubLifetimeManager improvements (#1904) 2018-04-09 12:31:14 +12:00
James Newton-King 27d18578d0
Use expression body properties and implicit arrays where possible (#1906) 2018-04-08 21:40:01 +12:00
James Newton-King 0f663cadc4
readonly all the things (#1901) 2018-04-08 15:47:01 +12:00
James Newton-King acc0b7ad0d
Serialize NegotiateResponse with IBufferWriter (#1881) 2018-04-07 15:50:13 +12:00
David Fowler f632330d7f
Allocate pipe writer stream per connection (#1885)
- Don't create the PipeWriterStream per operation, make it per Connection
- Reduce the buffer size for CopyToAsync operations to 4K where possible instead of 81K (the default)
2018-04-06 14:36:35 -07:00
David Fowler e51676fb47 Policheck errors 2018-04-06 13:01:20 -07:00
David Fowler e3d90bdf6a
Fix graceful closing of pipes (#1882)
- Closing pipes gracefully in most cases. The only case where we forcefully close the pipes is during application shutdown
- Return 404 if sending to connection after disposal
- Added tests
2018-04-06 10:59:40 -07:00
James Newton-King 36edadabb4
Lock when sending data to connection (#1876) 2018-04-06 16:25:47 +12:00