diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2021-06-14 08:03:25 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-14 08:03:25 -0500 |
| commit | 4cf8f8fa862b08131e9cc51c4bad3d6c9838342b (patch) | |
| tree | df489494232f9c4957dc1b5299a8b15edebc0d41 /src/slskd/Core/Service.cs | |
| parent | bd173e1bcb8640744ac32fcfe9f114f2f0f31df0 (diff) | |
| parent | ac2aca6a2dd4c6299d7b39a99b5545e94d1efbe4 (diff) | |
| download | slskd-4cf8f8fa862b08131e9cc51c4bad3d6c9838342b.tar.gz | |
Merge pull request #98 from slskd/reconnect-2
Don't try to reconnect following an intentional shutdown
Diffstat (limited to 'src/slskd/Core/Service.cs')
| -rw-r--r-- | src/slskd/Core/Service.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/slskd/Core/Service.cs b/src/slskd/Core/Service.cs index 5800ffa0..7a1e511f 100644 --- a/src/slskd/Core/Service.cs +++ b/src/slskd/Core/Service.cs @@ -154,7 +154,7 @@ namespace slskd public Task StopAsync(CancellationToken cancellationToken) { - Client.Disconnect("Shutting down"); + Client.Disconnect("Shutting down", new ApplicationShutdownException("Shutting down")); Client.Dispose(); Logger.Information("Client stopped"); return Task.CompletedTask; @@ -213,7 +213,7 @@ namespace slskd private async void Client_Disconnected(object sender, SoulseekClientDisconnectedEventArgs args) { - if (args.Exception is ObjectDisposedException) + if (args.Exception is ObjectDisposedException || args.Exception is ApplicationShutdownException) { Logger.Debug("Disconnected from the Soulseek server: the client is shutting down"); } |
