Skip to content

Commit

Permalink
fix: do not execute already executing browsers
Browse files Browse the repository at this point in the history
This was causing iframe reloads on IE8/IE9. These browsers use xhr-polling and socket.io does re-connects pretty often. We need to start execution only when the browser connects for the first time, no other re-connects.
  • Loading branch information
vojtajina committed Nov 25, 2013
1 parent 26c067d commit 00136cf
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,15 @@ var start = function(injector, config, launcher, globalEmitter, preprocess, file
}]).instantiate(browser.Browser);

newBrowser.init();

// execute in this browser immediately
if (config.singleRun) {
newBrowser.execute(config.client);
singleRunBrowsers.add(newBrowser);
}
}

replySocketEvents();

// execute in this browser immediately
if (config.singleRun) {
newBrowser.execute(config.client);
singleRunBrowsers.add(newBrowser);
}
});
});

Expand Down

0 comments on commit 00136cf

Please sign in to comment.