mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-06-23 15:30:56 -04:00
Dispose of process correctly in AttachmentExtractor
This commit is contained in:
parent
1c13be085f
commit
d705931e81
@ -164,12 +164,11 @@ namespace MediaBrowser.MediaEncoding.Attachments
|
|||||||
WindowStyle = ProcessWindowStyle.Hidden,
|
WindowStyle = ProcessWindowStyle.Hidden,
|
||||||
ErrorDialog = false
|
ErrorDialog = false
|
||||||
};
|
};
|
||||||
var process = new Process
|
|
||||||
{
|
|
||||||
StartInfo = startInfo,
|
|
||||||
EnableRaisingEvents = true
|
|
||||||
};
|
|
||||||
|
|
||||||
|
int exitCode;
|
||||||
|
|
||||||
|
using (var process = new Process { StartInfo = startInfo, EnableRaisingEvents = true })
|
||||||
|
{
|
||||||
_logger.LogInformation("{File} {Arguments}", process.StartInfo.FileName, process.StartInfo.Arguments);
|
_logger.LogInformation("{File} {Arguments}", process.StartInfo.FileName, process.StartInfo.Arguments);
|
||||||
|
|
||||||
process.Start();
|
process.Start();
|
||||||
@ -189,9 +188,8 @@ namespace MediaBrowser.MediaEncoding.Attachments
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var exitCode = ranToCompletion ? process.ExitCode : -1;
|
exitCode = ranToCompletion ? process.ExitCode : -1;
|
||||||
|
}
|
||||||
process.Dispose();
|
|
||||||
|
|
||||||
var failed = false;
|
var failed = false;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user