cbt-tunnel-nodejs icon indicating copy to clipboard operation
cbt-tunnel-nodejs copied to clipboard

cbt.stop() does not close the tunnel

Open mcosta74 opened this issue 5 years ago • 0 comments

I'm using protractor.

In beforeLaunch I call cbt.start() and I see the tunnel active in the UI In afterLaunch I call cbt.stop() the UI reports the tunnel is still open and also using the API tells me the tunnel is still active. What am I doing wrong ?

Here a snippet

config.beforeLaunch = function () {
  console.log('Before Launch');
  return new Promise((resolve, reject) => {
    cbt.stop((msg) => {});
    cbt.start({'username': CBT_USERNAME, 'authkey': CBT_AUTHKEY}, (err) => {
      if (!err) {
        return resolve();
      }
      console.error('Error:', err);
      return reject(err);
    });
  });
};

config.afterLaunch = function () {
  console.log('After Launch');
  cbt.stop((msg) => {
    console.log('Stop:', msg);
  });
};

The callback of the stop in never called

mcosta74 avatar Aug 05 '19 12:08 mcosta74