Esempio n. 1
0
        public void Abort(ConnectionAbortedException ex)
        {
            lock (_sync)
            {
                if (ControlStream != null)
                {
                    // TODO need to await this somewhere or allow this to be called elsewhere?
                    ControlStream.SendGoAway(_highestOpenedStreamId).GetAwaiter().GetResult();
                }
            }

            _haveSentGoAway = true;

            // Abort currently active streams
            foreach (var stream in _streams.Values)
            {
                stream.Abort(new ConnectionAbortedException("The Http3Connection has been aborted"), Http3ErrorCode.UnexpectedFrame);
            }
            // TODO need to figure out if there is server initiated connection close rather than stream close?
        }