コード例 #1
0
        protected override void OnBeforeAbort(Connection connection)
        {
            // Get the reader from the connection and stop it
            var reader = connection.GetValue<AsyncStreamReader>(ReaderKey);
            if (reader != null)
            {
                // Stop reading data from the stream
                reader.StopReading();

                // Remove the reader
                connection.Items.Remove(ReaderKey);
            }
        }
コード例 #2
0
        protected override void OnBeforeAbort(Connection connection)
        {
            // Get the reader from the connection and stop it
            var reader = connection.GetValue<AsyncStreamReader>(ReaderKey);
            if (reader != null)
            {
                // Stop reading data from the stream, don't close it since we're going to end
                // the request
                reader.StopReading(raiseCloseCallback: false);

                // Remove the reader
                connection.Items.Remove(ReaderKey);
            }
        }