setTimeout(function() { if (active) return; child.removeAllListeners(); child.kill('SIGINT'); // Let tor exit gracefully, since we try to bind on // the same port setTimeout(function() { resolve(Tor.spawn(port, dir, retryTimeout)); }, 1000); }, retryTimeout)
child.removeAllListeners(); reject(err); }); child.removeAllListeners(); reject(new Error( `Daemon terminated with code ${code} and signal ${signal}. ` + child.removeAllListeners(); child.channel.unref(); child.unref();