示例#1
0
        internal async Task AddChannelAsync(SelectorsOwner channel)
        {
            _channels.Add(channel);
            var tasks = new List <Task>();

            foreach (var registration in _registrations)
            {
                tasks.Add(channel.RegisterAsync(registration));
            }

            try
            {
                await Task.WhenAll(tasks).ConfigureAwait(false);
            }
            catch
            {
            }
        }
示例#2
0
        internal async Task AddChannelAsync(SelectorsOwner channel)
        {
            _channels.Add(channel);
            var tasks = new List <Task>();

            foreach (var registration in _registrations)
            {
                tasks.Add(channel.RegisterAsync(registration));
            }

            try
            {
                await Task.WhenAll(tasks).ConfigureAwait(false);
            }
            catch (Exception ex) when(ex.Message.Contains("Connection closed"))
            {
                // Ignore connection closed exceptions.
            }
        }