From c54d6d8c1c6f13bc2a5c14bde0af204cd6e59d99 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Fri, 23 Jul 2021 10:39:56 -0500 Subject: if a reconnect is pending, set PendingReconnect = false on disconnect --- src/slskd/Application/Service.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/slskd/Application/Service.cs b/src/slskd/Application/Service.cs index 890f9311..e2f63750 100644 --- a/src/slskd/Application/Service.cs +++ b/src/slskd/Application/Service.cs @@ -361,6 +361,11 @@ namespace slskd private async void Client_Disconnected(object sender, SoulseekClientDisconnectedEventArgs args) { + if (StateMonitor.Current.PendingReconnect) + { + StateMonitor.Set(state => state with { PendingReconnect = false }); + } + if (args.Exception is ObjectDisposedException || args.Exception is ApplicationShutdownException) { Logger.Information("Disconnected from the Soulseek server: the client is shutting down"); -- cgit v1.2.3