mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
don't run the idle shutdown timer if the process has errored
This commit is contained in:
parent
3da42df92c
commit
c8103a4f35
1 changed files with 2 additions and 1 deletions
|
@ -54,10 +54,11 @@ class ASpellWorkerPool
|
|||
worker.check words, (err, output) =>
|
||||
clearTimeout killTimer
|
||||
callback(err, output)
|
||||
# queue a shutdown if worker is not used
|
||||
return if err? # process has shut down
|
||||
if worker.count > @MAX_REQUESTS
|
||||
worker.shutdown("reached limit of " + @MAX_REQUESTS + " requests")
|
||||
else
|
||||
# queue a shutdown if worker is idle
|
||||
worker.idleTimer = setTimeout () ->
|
||||
worker.shutdown("idle worker")
|
||||
worker.idleTimer = null
|
||||
|
|
Loading…
Reference in a new issue