mafintosh / dns-socket

Make custom low-level DNS requests from node with retry support.
MIT License
106 stars 18 forks source link

race condition #3

Closed philkunz closed 7 years ago

philkunz commented 7 years ago

just tested this package, and there seems to be a race condition where sometimes answers return empty when called quickly after loading this module.

mafintosh commented 7 years ago

do you have an example?

philkunz commented 7 years ago

Take a look here: https://gitlab.com/pushrocks/dnsly/blob/master/ts/index.ts

It should work and does sometimes

But responses often return empty like here: https://gitlab.com/pushrocks/dnsly/builds/6250193

philkunz commented 7 years ago

switched to node's built in dns lookup for the meantime

mafintosh commented 7 years ago

pretty sure this was fixed by https://github.com/mafintosh/dns-socket/commit/ca5ef8875a1e59a2516db45524a7e5d862bf1a57