Comparing version 0.10.5 to 0.10.6
@@ -0,1 +1,14 @@ | ||
<a name="v0.10.6"></a> | ||
### v0.10.6 (2013-11-26) | ||
#### Bug Fixes | ||
* **browser:** reply "start" event ([8c1feae1](http://github.com/karma-runner/karma/commit/8c1feae1c0c60077365ca977fcf96640da449bee)) | ||
#### Features | ||
* **launcher:** send SIGKILL if SIGINT does not kill the browser ([eefcf00d](http://github.com/karma-runner/karma/commit/eefcf00dd869c7fce4da86064c2f063b5db39372)) | ||
<a name="v0.10.5"></a> | ||
@@ -2,0 +15,0 @@ ### v0.10.5 (2013-11-20) |
@@ -19,4 +19,5 @@ var spawn = require('child_process').spawn; | ||
var capturingUrl; | ||
var exitCallback = function() {}; | ||
var exitCallbacks = []; | ||
this.killTimeout = 2000; | ||
this.id = id; | ||
@@ -27,3 +28,2 @@ this.state = null; | ||
this.start = function(url) { | ||
@@ -64,11 +64,14 @@ capturingUrl = url; | ||
this.kill = function(callback) { | ||
exitCallback = callback || function() {}; | ||
var exitCallback = callback || function() {}; | ||
log.debug('Killing %s', self.name); | ||
if (self.state !== FINISHED) { | ||
if (self.state === FINISHED) { | ||
process.nextTick(exitCallback); | ||
} else if (self.state === BEING_KILLED) { | ||
exitCallbacks.push(exitCallback); | ||
} else { | ||
self.state = BEING_KILLED; | ||
self._process.kill(); | ||
} else { | ||
process.nextTick(exitCallback); | ||
exitCallbacks.push(exitCallback); | ||
setTimeout(self._onKillTimeout, self.killTimeout); | ||
} | ||
@@ -78,2 +81,12 @@ }; | ||
this._onKillTimeout = function() { | ||
if (self.state !== BEING_KILLED) { | ||
return; | ||
} | ||
log.warn('%s was not killed in %d ms, sending SIGKILL.', self.name, self.killTimeout); | ||
self._process.kill('SIGKILL'); | ||
}; | ||
this._onTimeout = function() { | ||
@@ -176,3 +189,8 @@ if (self.state !== BEING_CAPTURED) { | ||
self.state = FINISHED; | ||
self._cleanUpTmp(exitCallback); | ||
self._cleanUpTmp(function(err) { | ||
exitCallbacks.forEach(function(exitCallback) { | ||
exitCallback(err); | ||
}); | ||
exitCallbacks = []; | ||
}); | ||
}; | ||
@@ -179,0 +197,0 @@ |
@@ -82,6 +82,7 @@ var io = require('socket.io'); | ||
var EVENTS_TO_REPLY = ['start', 'info', 'error', 'result', 'complete']; | ||
socketServer.sockets.on('connection', function (socket) { | ||
log.debug('A browser has connected on socket ' + socket.id); | ||
var replySocketEvents = events.bufferEvents(socket, ['info', 'error', 'result', 'complete']); | ||
var replySocketEvents = events.bufferEvents(socket, EVENTS_TO_REPLY); | ||
@@ -88,0 +89,0 @@ socket.on('register', function(info) { |
@@ -55,2 +55,3 @@ { | ||
"David Jensen <david@frode.(none)>", | ||
"David M. Karr <dk068x@att.com>", | ||
"David Souther <davidsouther@gmail.com>", | ||
@@ -71,2 +72,3 @@ "Dillon <mdillon@reachmail.com>", | ||
"Kevin Ortman <kevin_ortman@msn.com>", | ||
"Lukasz Zatorski <lzatorski@gmail.com>", | ||
"Marko Anastasov <marko@renderedtext.com>", | ||
@@ -170,3 +172,3 @@ "Martin Lemanski <martin.lemanski@gmx.at>", | ||
}, | ||
"version": "0.10.5" | ||
"version": "0.10.6" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
857151
3317