TooTallNate / node-nat-pmp

Node.js implementation of the NAT Port Mapping Protocol
132 stars 16 forks source link

Fixing an issue where connection would be called twice (and throw an exception on binding a socket twice) #6

Closed unRob closed 11 years ago

unRob commented 11 years ago

On node 0.10.8 the example script would throw:

dgram.js:163
    throw new Error('Socket is already bound');
      ^
Error: Socket is already bound
    at Socket.bind (dgram.js:163:11)
    at Client.connect (/test.js:94:15)
    at /node_modules/nat-pmp/index.js:57:12
    at process._tickCallback (node.js:415:13)
    at Function.Module.runMain (module.js:499:11)
    at startup (node.js:119:16)
    at node.js:901:3
TooTallNate commented 11 years ago

I think I've ran into this before. Thanks!

unRob commented 11 years ago

Woah, that was fast. Awesome work Nate!