From c7adfdb29c4a0269193f3dca91bf0349226e7f69 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sat, 6 Aug 2022 16:56:15 -0500 Subject: add IsShuttingDown --- src/slskd/Application.cs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/slskd/Application.cs b/src/slskd/Application.cs index 1c7bef18..00b43fc8 100644 --- a/src/slskd/Application.cs +++ b/src/slskd/Application.cs @@ -155,6 +155,13 @@ namespace slskd ConnectionWatchdog = connectionWatchdog; } + /// + /// Gets a value indicating whether the application is in the process of shutting down. + /// + public static bool IsShuttingDown => Environment.HasShutdownStarted || ShuttingDown; + + private static bool ShuttingDown { get; set; } = false; + private ISoulseekClient Client { get; set; } private IRoomService RoomService { get; set; } private IBrowseTracker BrowseTracker { get; set; } -- cgit v1.2.3