Skip to content

Commit

Permalink
fix: nullify tunnel on close sauce connect (#11)
Browse files Browse the repository at this point in the history
* nullify tunnel on close sauce connect

Fix issue with "Cannot read property 'on' of null" when re-run tests in web ui

* fix styleguide issues
  • Loading branch information
wKich authored and limonte committed Dec 13, 2018
1 parent 94ab12d commit 63d8ad5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/sauce.js
Expand Up @@ -10,6 +10,8 @@ function Sauce() {
console.log('Closing Sauce Connect.');
if(_tunnel) {
_tunnel.close(function() {
console.log('Sauce Connect closed.');
_tunnel = null;
done();
});
} else {
Expand Down Expand Up @@ -47,4 +49,4 @@ function Sauce() {
};
}

module.exports = Sauce;
module.exports = Sauce;

0 comments on commit 63d8ad5

Please sign in to comment.