aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJP Dillingham <jpdillingham@gmail.com>2021-06-19 21:57:32 -0500
committerJP Dillingham <jpdillingham@gmail.com>2021-06-19 21:57:32 -0500
commit781fe3cc1f8ea8d35151fcd86f43889d066ecfb6 (patch)
treecff1a51c0a55cdd69fbfdf154eca32e22ee46be6
parentc38f0ecc3c8e98d178af7113841485dcbd2506d9 (diff)
downloadslskd-781fe3cc1f8ea8d35151fcd86f43889d066ecfb6.tar.gz
dont reconnect after IntentionalDisconnectException
-rw-r--r--src/slskd/Application/Service.cs6
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;