diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2022-08-06 16:56:15 -0500 |
|---|---|---|
| committer | JP Dillingham <jpdillingham@gmail.com> | 2022-08-06 16:56:15 -0500 |
| commit | c7adfdb29c4a0269193f3dca91bf0349226e7f69 (patch) | |
| tree | 8a1c9ccf9de88ab82cb5835aabfc1a298a418f5f /src | |
| parent | 7ba93b9a27a82b79ff1852b7c0bcd00f79bb02d3 (diff) | |
| download | slskd-c7adfdb29c4a0269193f3dca91bf0349226e7f69.tar.gz | |
add IsShuttingDown
Diffstat (limited to 'src')
| -rw-r--r-- | src/slskd/Application.cs | 7 |
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; } |
