/// <summary> /// 重新给直播间分配一个新 client /// </summary> /// <param name="room"></param> private static void RetryRoom(StreamRoom room) { if (++room.RetryTime >= 3) { return; } var client = ConnectedClient.FirstOrDefault(x => x.MaxParallelTask > x.CurrentJobs.Count); if (client == null) { RoomQueue.AddFirst(room); } else { ConnectedClient.Remove(client); ConnectedClient.Add(client); SendTask(client, room); } }