Close() private method

private Close ( string key, bool allowCommandsToComplete = true ) : void
key string
allowCommandsToComplete bool
return void
        public override void Dispose()
        {
            if (_channel != null)
            {
                _channel.Unsubscribe(_keys);
                _channel.Close(abort: true);
            }

            if (_connection != null)
            {
                _connection.Close(abort: true);
            }
        }
Example #2
0
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (_channel != null)
                {
                    _channel.Unsubscribe(_keys);
                    _channel.Close(abort: true);
                }

                if (_connection != null)
                {
                    _connection.Close(abort: true);
                }
            }

            base.Dispose(disposing);
        }