private async Task NormalConnectionLeaveGroup() { if (_connections.Count >= _groupCount) { await Task.WhenAll(from i in Enumerable.Range(0, _connections.Count) select SignalRUtils.LeaveFromGroup(_connections[i], SignalRUtils.GroupName(_type, _connectionIndex[i] % _groupCount), _statisticsCollector)); } else { var connectionCount = _connections.Count; await Task.WhenAll(from i in Enumerable.Range(0, _groupCount) select SignalRUtils.LeaveFromGroup(_connections[i % connectionCount], SignalRUtils.GroupName(_type, i), _statisticsCollector)); } }