map indefinite again
parent
44f9fde5e2
commit
d3c33cd113
|
|
@ -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...');
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Reference in New Issue