From c5d98fd57c05229b0783e205778fa660c4e7e43c Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sun, 5 Sep 2021 12:42:39 -0500 Subject: don't try to join tracked rooms --- src/slskd/Application/Application.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/slskd/Application/Application.cs b/src/slskd/Application/Application.cs index d5c0dcff..8695bbb0 100644 --- a/src/slskd/Application/Application.cs +++ b/src/slskd/Application/Application.cs @@ -1,4 +1,4 @@ -// +// // Copyright (c) slskd Team. All rights reserved. // // This program is free software: you can redistribute it and/or modify @@ -439,7 +439,11 @@ namespace slskd { Logger.Information("Joining rooms {Rooms}", string.Join(", ", OptionsMonitor.CurrentValue.Rooms)); - var tasks = rooms.Select(room => SoulseekClient.JoinRoomAsync(room) + // don't try to join rooms that we've already joined. the server returns no response in this case + // and the client believes the request has timed out. + var unjoined = rooms.Where(room => !RoomTracker.Rooms.ContainsKey(room)); + + var tasks = unjoined.Select(room => SoulseekClient.JoinRoomAsync(room) .ContinueWith(task => Logger.Warning("Failed to join room {Room}: {Message}", room, task.Exception.InnerExceptions.First().Message), TaskContinuationOptions.OnlyOnFaulted)); return Task.WhenAll(tasks); -- cgit v1.2.3