diff --git a/lib/launchers/process.js b/lib/launchers/process.js index c9416334b..067cfae87 100644 --- a/lib/launchers/process.js +++ b/lib/launchers/process.js @@ -22,7 +22,7 @@ var ProcessLauncher = function(spawn, tempDir, timer) { onExitCallback = done; self._process.kill(); - timer.setTimeout(self._onKillTimeout, killTimeout); + self._killTimer = timer.setTimeout(self._onKillTimeout, killTimeout); }); this._start = function(url) { @@ -110,6 +110,10 @@ var ProcessLauncher = function(spawn, tempDir, timer) { } self._process = null; + if (self._killTimer) { + timer.clearTimeout(self._killTimer); + self._killTimer = null; + } self._clearTempDirAndReportDone(error); };