problem with nat-upnp module in Node.js

26 views
Skip to first unread message

Nuno Barros

unread,
May 5, 2014, 6:29:09 AM5/5/14
to nod...@googlegroups.com
I'am trying to open multiple ports in a router using the module nat-upnp for Node.js, but my problem is that i cant process the error since the function is asynchronous.

My objective is to open x ports and if a error is caught it should divide the number of ports by 2, and try again until I stick with a max number of ports that can be opened.

At the moment, when i run it does everything ok but only gives the errors at the end, and because of that it never divide the original number by 2, also it gives this warning:

warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit.

I tried to setMaxListeners() but it didn't fix it


Reply all
Reply to author
Forward
0 new messages