Skip to content

Commit

Permalink
Pull in some additional fixes from karma-runner#1319
Browse files Browse the repository at this point in the history
  • Loading branch information
dignifiedquire committed May 15, 2015
1 parent 53bb0e2 commit 6eb5b75
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/launchers/process.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ var ProcessLauncher = function(spawn, tempDir, timer) {

var errorOutput = '';

self._process.on('close', function(code) {
self._process.on('exit', function(code) {
self._onProcessExit(code, errorOutput);
});

Expand Down
4 changes: 3 additions & 1 deletion lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,9 @@ var start = function(injector, config, launcher, globalEmitter, preprocess, file
sockets.forEach(function(socket) {
socket.removeAllListeners('disconnect');
if (!socket.disconnected) {
socket.disconnect();
// Disconnect asynchronously. Socket.io mutates the `sockets.sockets` array
// underneath us so this would skip every other browser/socket.
process.nextTick(socket.disconnect.bind(socket));
}
});

Expand Down

0 comments on commit 6eb5b75

Please sign in to comment.