mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-30 12:24:25 +02: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:
@@ -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, []
|
||||
|
||||
Reference in New Issue
Block a user