Use private reflection to call InternalRegisterWithoutEC
Don't capture the execution context when registering cancellation tok…
1). cancellation token callback in ForeverTransport.cs doesn't get called for forereverFrame and serverSentEvents when cancel, however it works for websockets.
2). cancellation token callback in TransportDisconnectBase.cs doesn't get called when host stop, when I change to use Register method instead of SafeRegister here the callback get called.
Can you be more clear about the exact repro steps? You're saying that they never fire anymore and we leak memory like crazy now?
I'm trying it out with server sent events and cancel is firing. Here's what I did:
Opened the raw sample to the following url
Open the task manager in chrome:
Killed the tab and waited for End() to be called on TransportDisconnectBase (this calls Cancel() and triggers the callback).
Is this a regression?
this is not regression.
verified no regression