I have noticed multiple errors when using the 1:1 mapping of the upstream node.js dns module combined with the platform object. This is with node version 0.12 and native-dns version 0.7.0.
See below for scripts to reproduce the errors and the output when running these scripts. The only difference between these scripts is the dns.platform.name_servers value.
I think that the scripts and outputs are self-explanatory, but if more information is required then please let me know.
$ time node dns.js
{ [Error: getHostByName ETIMEOUT] errno: 'ETIMEOUT', syscall: 'getHostByName' }
Process time: 5 seconds
events.js:85
throw er; // Unhandled 'error' event
^
Error: connect ETIMEDOUT
at exports._errnoException (util.js:746:11)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:983:19)
real 2m7.993s
user 0m0.223s
sys 0m0.009s
expected behavior, 10 attempts with 500 ms timeout
current behavior, 5 attempts with 1000 ms timeout
note, all values for attempts are divided by two and all values for timeout are multiplied by two (monitored with Wireshark)
expected behavior, after returning the error object with ETIMEOUT, continue processing
current behavior, after returning the error object, the process is locked for two minutes and then it throws an error (doesn't return the error object)
note, these are fake DNS servers and notice that the process time console logged in the script is 5 seconds (as expected), but the total execution time is more than two minutes
Hi,
I have noticed multiple errors when using the 1:1 mapping of the upstream node.js dns module combined with the platform object. This is with node version 0.12 and native-dns version 0.7.0.
See below for scripts to reproduce the errors and the output when running these scripts. The only difference between these scripts is the dns.platform.name_servers value.
I think that the scripts and outputs are self-explanatory, but if more information is required then please let me know.