mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-02-01 03:12:42 +01:00
import/export: Kill soffice spawned process after 120 seconds (#4499)
Due to libreoffice being buggy / hanging on certain pdf imports (even in 7.0.3) we should just kill it so it doesn't consume CPU indefinitely.
This commit is contained in:
parent
06e0ff3cd3
commit
776eda2d4e
1 changed files with 7 additions and 1 deletions
|
@ -89,6 +89,12 @@ function doConvertTask(task, callback) {
|
||||||
task.srcFile,
|
task.srcFile,
|
||||||
'--outdir', tmpDir
|
'--outdir', tmpDir
|
||||||
]);
|
]);
|
||||||
|
// Soffice/libreoffice is buggy and often hangs.
|
||||||
|
// To remedy this we kill the spawned process after a while.
|
||||||
|
setTimeout(function(){
|
||||||
|
soffice.stdin.pause(); // required to kill hanging threads
|
||||||
|
soffice.kill();
|
||||||
|
}, 120000);
|
||||||
|
|
||||||
var stdoutBuffer = '';
|
var stdoutBuffer = '';
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue