From 05a85f98f3f2232fcfd47cb2b9392be9daae2b1c Mon Sep 17 00:00:00 2001 From: Jesse Chan Date: Sun, 6 Dec 2020 21:55:44 +0800 Subject: [PATCH] server: torrents: apply 10-second timeout to mediainfo --- server/routes/api/torrents.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/routes/api/torrents.ts b/server/routes/api/torrents.ts index 7f465f8c..43fa9d14 100644 --- a/server/routes/api/torrents.ts +++ b/server/routes/api/torrents.ts @@ -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);