mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-11 03:57:20 +00:00
don't let error events overwrite exit event
(not sure if this can happen but it would be bad if it did)
This commit is contained in:
parent
c8103a4f35
commit
3bbd0d49a9
1 changed files with 2 additions and 2 deletions
|
@ -16,12 +16,12 @@ class ASpellWorker
|
|||
logger.log process: @pipe.pid, lang: @language, "aspell worker has exited"
|
||||
metrics.inc "aspellWorker-exit-" + @language
|
||||
@pipe.on 'error', (err) =>
|
||||
@state = 'error'
|
||||
@state = 'error' unless @state == 'killed'
|
||||
logger.log process: @pipe.pid, error: err, stdout: output, stderr: error, lang: @language, "aspell worker error"
|
||||
if @callback?
|
||||
@callback err, []
|
||||
@pipe.stdin.on 'error', (err) =>
|
||||
@state = 'error'
|
||||
@state = 'error' unless @state == 'killed'
|
||||
logger.log process: @pipe.pid, error: err, stdout: output, stderr: error, lang: @language, "aspell worker error on stdin"
|
||||
if @callback?
|
||||
@callback err, []
|
||||
|
|
Loading…
Add table
Reference in a new issue