uncaughtException in reverse
Hi,
When I'm triing to make a reverse lookup to a dns server (tinydns) and doesn't respond, native-dns drops an uncaughtException that isn't caught by the try / catch. The error is:
events.js:72throw er; // Unhandled 'error' event^Error: connect ECONNREFUSEDat errnoException (net.js:904:11)at Object.afterConnect [as oncomplete] (net.js:895:19)
The code that generates the error, is:
var remoteip = 8.8.8.8;ndns.platform.timeout = 500;ndns.platform.name_servers.length = 0;ndns.platform.name_servers.push({address: '178.62.48.121', port: 53, type: "udp"});
try {var dreq = ndns.reverse(remoteip, function(error, result) {if(error) {callback(error, null);}elsecallback(null, true);});}catch(error){console.log(error);callback(error, null);}
Best regards, Zarmack
Did you have error and socketError handlers attached?