diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2021-06-19 21:57:32 -0500 |
|---|---|---|
| committer | JP Dillingham <jpdillingham@gmail.com> | 2021-06-19 21:57:32 -0500 |
| commit | 781fe3cc1f8ea8d35151fcd86f43889d066ecfb6 (patch) | |
| tree | cff1a51c0a55cdd69fbfdf154eca32e22ee46be6 /src | |
| parent | c38f0ecc3c8e98d178af7113841485dcbd2506d9 (diff) | |
| download | slskd-781fe3cc1f8ea8d35151fcd86f43889d066ecfb6.tar.gz | |
dont reconnect after IntentionalDisconnectException
Diffstat (limited to 'src')
| -rw-r--r-- | src/slskd/Application/Service.cs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/slskd/Application/Service.cs b/src/slskd/Application/Service.cs index 246e7fc6..43688a0e 100644 --- a/src/slskd/Application/Service.cs +++ b/src/slskd/Application/Service.cs @@ -216,6 +216,10 @@ namespace slskd { Logger.Debug("Disconnected from the Soulseek server: the client is shutting down"); } + else if (args.Exception is IntentionalDisconnectException) + { + Logger.Debug("Disconnected from the Soulseek server: disconnected by the user"); + } else if (args.Exception is LoginRejectedException) { Logger.Error("Disconnected from the Soulseek server: invalid username or password"); @@ -226,7 +230,7 @@ namespace slskd } else { - Logger.Error("Disconnected from the Soulseek server: {Message}", args.Exception.Message); + Logger.Error("Disconnected from the Soulseek server: {Message}", args.Exception?.Message ?? args.Message); var attempts = 1; |
