diff --git a/lib/launchers/process.js b/lib/launchers/process.js index c9416334b..602cbbaeb 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) { @@ -111,6 +111,7 @@ var ProcessLauncher = function(spawn, tempDir, timer) { self._process = null; self._clearTempDirAndReportDone(error); + timer.clearTimeout(self._killTimer); }; this._clearTempDirAndReportDone = function(error) {