mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-11-06 22:26:07 +00:00
Use a TimeSpan instead of ms and support providing a custom CancellationToken
This commit is contained in:
1 parent
7447ea8960
commit
97c36d11d4
3 files changed
+22
-9
No files matched your search
@@ -596,7 +596,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||
timeoutMs = DefaultImageExtractionTimeout;
|
||||
}
|
||||
|
||||
ranToCompletion = await process.WaitForExitAsync(timeoutMs).ConfigureAwait(false);
|
||||
ranToCompletion = await process.WaitForExitAsync(TimeSpan.FromMilliseconds(timeoutMs)).ConfigureAwait(false);
|
||||
|
||||
if (!ranToCompletion)
|
||||
{
|
||||
@@ -729,7 +729,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||
|
||||
while (isResponsive)
|
||||
{
|
||||
if (await process.WaitForExitAsync(30000).ConfigureAwait(false))
|
||||
if (await process.WaitForExitAsync(TimeSpan.FromSeconds(30)).ConfigureAwait(false))
|
||||
{
|
||||
ranToCompletion = true;
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user