server: torrents: apply 10-second timeout to mediainfo

This commit is contained in:
Jesse Chan
2020-12-06 21:55:44 +08:00
parent ebb4927b74
commit 05a85f98f3
+1 -1
View File
@@ -676,7 +676,7 @@ router.get('/:hash/mediainfo', async (req, res) => {
const mediainfoProcess = childProcess.execFile(
'mediainfo',
[contentPath],
{maxBuffer: 1024 * 2000},
{maxBuffer: 1024 * 2000, timeout: 1000 * 10},
(error, stdout, stderr) => {
if (error) {
callback(null, error);