mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 14:13:34 +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,7 +89,13 @@ function doConvertTask(task, callback) {
|
|||
task.srcFile,
|
||||
'--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 = '';
|
||||
|
||||
// Delegate the processing of stdout to another function
|
||||
|
|
Loading…
Reference in a new issue