aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/slskd/Application.cs7
1 files changed, 7 insertions, 0 deletions
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;
}
+ /// <summary>
+ /// Gets a value indicating whether the application is in the process of shutting down.
+ /// </summary>
+ 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; }