public void Abort() { // Make sure to set the aborted flag before running any continuations. _flow.Abort(); while (_awaitableProvider.ActiveCount > 0) { _awaitableProvider.CompleteCurrent(); } }
public int Abort() { lock (_flowLock) { if (_flow.IsAborted) { return(0); } _flow.Abort(); // Tell caller to return connection window space consumed by this stream. Even if window updates have // been disabled at the stream level, connection-level window updates may still be necessary. return(_initialWindowSize - _flow.Available); } }