Example #1
0
        private void CloseDataChannel()
        {
            try
            {
                _log.Information("Relay: {relay}. Closing the data channel", _relay);

                _uplinkPumps.DisposeAndClear();

                _downlinkPump.IgnoreException(x => x.Dispose());
                _downlinkPump = null;

                if (_dataChannel != null)
                {
                    _dataChannel.Dispose();
                    _dataChannel = null;
                }

                _canAcceptUntil = DateTime.MaxValue;

                OnDataChannelClosed?.Invoke(this);

                _log.Debug("Relay: {relay}. The data channel was closed", _relay);
            }
            catch
            {
                // intentional
            }
        }
Example #2
0
        public void Clear()
        {
            Drain();

            _queues.DisposeAndClear();

            _log.Verbose("Frame dispatcher cleared.");
        }
Example #3
0
        public void Dispose()
        {
            foreach (var connection in _tunnels)
            {
                connection.IgnoreException(x => x.Dispose());
            }

            _replacedTunnels.DisposeAndClear();
        }
Example #4
0
        public void Dispose()
        {
            try
            {
                _log.Information("Closing the data channel {relayTags}", _metrics);

                _uplinkPumps.DisposeAndClear();

                _downlinkPump.IgnoreException(x => x.Dispose());

                _log.Debug("The data channel was closed {relayTags}", _metrics);
            }
            catch
            {
                // intentional
            }
        }
Example #5
0
 public void Dispose()
 {
     _tunnels.DisposeAndClear();
 }