How to use the tunnel.process function in tunnel

To help you get started, we’ve selected a few tunnel examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github browserstack / browserstack-runner / bin / cli.js View on Github external
callback = callback || function() {};
  report = report || [];
  logger.trace('cleanUpAndExit: signal: %s', signal);

  try {
    server.close();
  } catch (e) {
    logger.debug('Server already closed');
  }

  if (statusPoller) {
    statusPoller.stop();
  }

  try {
    process.kill(tunnel.process.pid, 'SIGTERM');
  } catch (e) {
    logger.debug('Non existent tunnel');
  }

  if (signal === 'SIGTERM') {
    logger.debug('Exiting');
    callback(error, report);
  } else {
    terminateAllWorkers(function() {
      logger.debug('Exiting');
      callback(error, report);
    });
  }
}

tunnel

Node HTTP/HTTPS Agents for tunneling proxies

MIT
Latest version published 6 years ago

Package Health Score

55 / 100
Full package analysis