Skip to content

Commit

Permalink
fix: avoid reconnecting browsers from previous runs
Browse files Browse the repository at this point in the history
  • Loading branch information
vojtajina committed Jun 26, 2013
1 parent 42da925 commit b04341c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,10 @@ var SauceLabBrowser = function(id, args, sauceConnect, /* config.sauceLabs */ co
this.kill = function(done) {
clearTimeout(pendingHeartBeat);
log.debug('Shutting down Sauce Labs driver');
driver.quit(done);
// workaround - navigate to other page to avoid re-connection
driver.get('http://www.google.com', function() {
driver.quit(done);
});
};

this.markCaptured = function() {
Expand Down

2 comments on commit b04341c

@santiycr
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vojtajina Oh, I understand what this problem is now! It makes sense that browsers end up reconnecting under edgy conditions. I'd recommend replacing google.com with about:blank instead for performance reasons.

@vojtajina
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@santiycr thanks, changed to 'about:blank'

Please sign in to comment.