tjfontaine / node-dns

Replacement dns module in pure javascript for node.js
MIT License
585 stars 154 forks source link

0.8.0, pass socket.bind options to client.resolve #100

Closed gshively11 closed 2 years ago

gshively11 commented 9 years ago

Added the ability to send socket.bind options via the ip parameter (now named options, but it's backwards compatible) in the client.resolve method. This allows us to set the socket as exclusive, which makes it play nice with clustering. https://github.com/joyent/node/issues/2194

UDP Sockets are supposed to be exclusive by default, however, we're running node 0.12.7 and aren't seeing this behavior. node-dns falls apart with clustering enabled and multiple workers unless we explicitly set exclusive to true.

I wasn't sure how to run tests (npm test just hangs after outputting 'client' to the console), but benchmark seems to handle regression fine and supports the changes.

taoeffect commented 8 years ago

This project is no longer maintained, but we are happy to link to a well maintained fork.

Please see: https://github.com/tjfontaine/node-dns/issues/111