From c01c48885b9e634609aad92aa07be5f5c4bff246 Mon Sep 17 00:00:00 2001 From: Jon Nordby Date: Fri, 11 Aug 2017 18:41:40 +0200 Subject: [PATCH] runner: clearTimeout when stopping process --- src/runner.coffee | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/runner.coffee b/src/runner.coffee index d5a9680..c23afa8 100644 --- a/src/runner.coffee +++ b/src/runner.coffee @@ -318,7 +318,7 @@ class PhantomProcess @stopping = true @child.kill 'SIGKILL' # should now fire exit handler - setTimeout onHardTimeout, @options.hardtimeout + @child.hardTimeout = setTimeout onHardTimeout, @options.hardtimeout @stdout = "" @child.stdout.on 'data', (data) => @@ -354,8 +354,10 @@ class PhantomProcess callback @cancelError else callback null, job.id + callback = null - @stopping = null + @stopping = false + clearTimeout @child.hardTimeout return stop: () ->