diff options
| author | JP Dillingham <jp@dillingham.me> | 2025-07-12 14:58:53 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-12 14:58:53 -0500 |
| commit | 367b2cee4d475277fb278e6537f1014436d5a09f (patch) | |
| tree | 2bcdd9f727ebfbb57787ee203e6760a3e0f1e910 /src/slskd/Application.cs | |
| parent | eed42e9c4916e2ba653e40147de546e7af3af563 (diff) | |
| parent | 11456386b8c3dcd6d054b2ceff5861a972fbe3cd (diff) | |
| download | slskd-367b2cee4d475277fb278e6537f1014436d5a09f.tar.gz | |
Merge pull request #1385 from slskd/dns
Adjust auto-reconnect logic
Diffstat (limited to 'src/slskd/Application.cs')
| -rw-r--r-- | src/slskd/Application.cs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/slskd/Application.cs b/src/slskd/Application.cs index 6ed8a9d4..ab666c85 100644 --- a/src/slskd/Application.cs +++ b/src/slskd/Application.cs @@ -88,7 +88,7 @@ namespace slskd IManagedState<State> state, ISoulseekClient soulseekClient, FileService fileService, - IConnectionWatchdog connectionWatchdog, + ConnectionWatchdog connectionWatchdog, ITransferService transferService, IBrowseTracker browseTracker, IRoomTracker roomTracker, @@ -213,7 +213,7 @@ namespace slskd private FileService Files { get; } private IRoomService RoomService { get; set; } private IBrowseTracker BrowseTracker { get; set; } - private IConnectionWatchdog ConnectionWatchdog { get; } + private ConnectionWatchdog ConnectionWatchdog { get; } private IMessagingService Messaging { get; set; } private ILogger Log { get; set; } = Serilog.Log.ForContext<Application>(); private ConcurrentDictionary<string, ILogger> Loggers { get; } = new ConcurrentDictionary<string, ILogger>(); @@ -860,7 +860,7 @@ namespace slskd else { Log.Error("Disconnected from the Soulseek server: {Message}", args.Exception?.Message ?? args.Message); - ConnectionWatchdog.Restart(); + ConnectionWatchdog.Start(); } } @@ -992,8 +992,8 @@ namespace slskd { Server = state.Server with { - Address = Client.Address, - IPEndPoint = Client.IPEndPoint, + Address = Client.State.HasFlag(SoulseekClientStates.Disconnected) ? null : Client.Address, + IPEndPoint = Client.State.HasFlag(SoulseekClientStates.Disconnected) ? default : Client.IPEndPoint, State = Client.State, }, User = state.User with |
