diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2021-09-05 12:42:39 -0500 |
|---|---|---|
| committer | JP Dillingham <jpdillingham@gmail.com> | 2021-09-05 12:42:39 -0500 |
| commit | c5d98fd57c05229b0783e205778fa660c4e7e43c (patch) | |
| tree | 70562dd5c7e0441d7a263fabdbd3af3fcafbd6bc /src | |
| parent | ab99deace640229c91c4b8e4581cd9351e542eb2 (diff) | |
| download | slskd-c5d98fd57c05229b0783e205778fa660c4e7e43c.tar.gz | |
don't try to join tracked rooms
Diffstat (limited to 'src')
| -rw-r--r-- | src/slskd/Application/Application.cs | 8 |
1 files changed, 6 insertions, 2 deletions
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 file="Application.cs" company="slskd Team"> +// <copyright file="Application.cs" company="slskd Team"> // 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); |
