mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Catch exception instead of masking it
This commit is contained in:
parent
debb8e56fd
commit
bf4de012da
@ -105,9 +105,16 @@ namespace Jellyfin.Server
|
|||||||
await appHost.RunStartupTasks();
|
await appHost.RunStartupTasks();
|
||||||
|
|
||||||
// TODO: read input for a stop command
|
// TODO: read input for a stop command
|
||||||
// Block main thread until shutdown
|
|
||||||
await Task.Delay(-1, _tokenSource.Token)
|
try
|
||||||
.ContinueWith(delegate{}); // Don't throw on cancellation
|
{
|
||||||
|
// Block main thread until shutdown
|
||||||
|
await Task.Delay(-1, _tokenSource.Token);
|
||||||
|
}
|
||||||
|
catch (TaskCanceledException)
|
||||||
|
{
|
||||||
|
// Don't throw on cancellation
|
||||||
|
}
|
||||||
|
|
||||||
_logger.LogInformation("Disposing app host");
|
_logger.LogInformation("Disposing app host");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user