Closed jdppettit closed 3 years ago
Using resolve/3 like so:
resolve/3
DNS.resolve("google.com", :a, {"not.a.dns.server.com", 53})
Results in the call hanging indefinitely (or at least appears to hang indefinitely). This can be corrected by using recv!/2 rather than recv!/1 with a timeout option here:
recv!/2
recv!/1
https://github.com/tungd/elixir-dns/blob/master/lib/dns.ex#L48
I forked and made this change for my own purposes for now (https://github.com/silverp1/elixir-dns/commit/08c535afe84afc725edd9b0b99bdfaa6f41ee917) but figured I'd raise the issue to see what folks think about doing something like this in master.
My use case here is a monitoring application where users supply the record to check as well as the DNS server to query.
I'll fix this in the next release. Thank you very much 👍
Using
resolve/3
like so:DNS.resolve("google.com", :a, {"not.a.dns.server.com", 53})
Results in the call hanging indefinitely (or at least appears to hang indefinitely). This can be corrected by using
recv!/2
rather thanrecv!/1
with a timeout option here:https://github.com/tungd/elixir-dns/blob/master/lib/dns.ex#L48
I forked and made this change for my own purposes for now (https://github.com/silverp1/elixir-dns/commit/08c535afe84afc725edd9b0b99bdfaa6f41ee917) but figured I'd raise the issue to see what folks think about doing something like this in master.
My use case here is a monitoring application where users supply the record to check as well as the DNS server to query.