Skip to content
This repository has been archived by the owner on Oct 30, 2020. It is now read-only.

Commit

Permalink
runner: clearTimeout when stopping process
Browse files Browse the repository at this point in the history
  • Loading branch information
jonnor committed Aug 11, 2017
1 parent 7a2f642 commit c01c488
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/runner.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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) =>
Expand Down Expand Up @@ -354,8 +354,10 @@ class PhantomProcess
callback @cancelError
else
callback null, job.id

callback = null
@stopping = null
@stopping = false
clearTimeout @child.hardTimeout
return

stop: () ->
Expand Down

0 comments on commit c01c488

Please sign in to comment.