Closed indutny closed 12 years ago
Ya, so the problem is that nat-pmp binds to a udp port. You should call client.close()
after doing your thing (like in the examples in the test
dir), and that'll free the port.
I think short-lived clients are better in general. Perhaps I'll make the close()
call happen automatically if that seems like a good idea.
Well, port may be bound by other client (like second application instance). Why not just wrap it with try/catch and report error in callback?
Ah I didn't realize it was an uncaught exception. Ya, an "error" event should be emitted on the client object. This is a bug.
/cc @drudge