Skip to content

Commit

Permalink
fix(web-server): close webserver after running
Browse files Browse the repository at this point in the history
When we're done running the tests and all clients are disconnected,
we should stop the http server. This way another karma instance (or
anything else for that matter) may reuse the port later.
  • Loading branch information
jpommerening committed Feb 18, 2014
1 parent f9c0cbe commit f9dee46
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,10 @@ var start = function(injector, config, launcher, globalEmitter, preprocess, file
});

globalEmitter.emitAsync('exit').then(function() {
done(code || 0);
// All systems down, stop the webserver
webServer.close(function () {
done(code || 0);
});
});
};

Expand Down

0 comments on commit f9dee46

Please sign in to comment.