Open zarmack opened 9 years ago
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:72 throw er; // Unhandled 'error' event ^ Error: connect ECONNREFUSED at errnoException (net.js:904:11) at Object.afterConnect [as oncomplete] (net.js:895:19)
events.js:72
throw er; // Unhandled 'error' event
^
Error: connect ECONNREFUSED
at 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); } else callback(null, true); }); } catch(error) { console.log(error); callback(error, null); }
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"});
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); } else callback(null, true); }); } catch(error) { console.log(error); callback(error, null); }
try {
var dreq = ndns.reverse(remoteip, function(error, result) {
if(error) {
callback(error, null);
}
else
callback(null, true);
});
catch(error)
{
console.log(error);
Best regards, Zarmack
Did you have error and socketError handlers attached?
error
socketError
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:
The code that generates the error, is:
Best regards, Zarmack