map indefinite again

canary
Marcus 2021-04-01 01:13:07 -04:00
parent 44f9fde5e2
commit d3c33cd113
2 changed files with 2 additions and 2 deletions

View File

@ -44,7 +44,7 @@ class Node extends EventEmitter {
for(let port = config.ports.relay; port <= config.ports.relayEnd; port ++) {
if(takenPorts.indexOf(port) === -1) {
console.log('registering to port ' + port);
await upnp.mapIndefinite(port, 10, this.name);
await upnp.mapIndefinite(port, this.name);
break;
} else {
console.log('port ' + port + ' is taken...');

View File

@ -15,7 +15,7 @@ module.exports.map = function(port, ttl = 10, name = 'upnp application') {
});
};
module.exports.mapIndefinite = function(port, name) {
module.exports.mapIndefinite = function(port, name = 'upnp application') {
return new Promise((res, rej) => {
client.portMapping({
private: port,