protected override void OnBeforeAbort(IConnection connection)
{
// Get the reader from the connection and stop it
AsyncStreamReader _reader = ConnectionExtensions.GetValue <AsyncStreamReader>(connection, m_readerKey);
if (_reader != null)
{
// Stop reading data from the stream
_reader.StopReading(false);
// Remove the reader
connection.Items.Remove(m_readerKey);
}
}