karma-runner/karma — pull request #1146 by jpommerening (2014-07-29 09:40:11+00:00)
Title: fix(server): launch browsers when file_list is ready

After weeks of intermittent timeouts starting PhantomJS I finally found out what's wrong–

We're having a lot of files (well, not *that* many, maybe a hundred) and we're using `grunt-karma` to trigger single-run tests with PhantomJS in a continuous integration environment.

Correct me if I'm wrong, but it looks like the web server is not ready to reply to the browser's connect request until the file list is finished. Since PhantomJS' startup is really quick, it sometimes tries to connect before `fileList.refresh()` completed.

After applying this patch, the problem seems to disappear… what do you think?