Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a dns :query() doesn't close socket on timeout #180

Open
daurnimator opened this issue Feb 18, 2017 · 0 comments
Open

a dns :query() doesn't close socket on timeout #180

daurnimator opened this issue Feb 18, 2017 · 0 comments

Comments

@daurnimator
Copy link
Collaborator

If a query times out it doesn't close the socket. For UDP I think this is expected, but not so much for TCP:

local dns_record = require "cqueues.dns.record"
local dns_resolvers = require "cqueues.dns.resolvers"
local dns_config = require "cqueues.dns.config"

local pool = dns_resolvers.new(dns_config.stub{
	nameserver = { "8.8.8.8" };
	tcp = dns_config.TCP_ONLY;
})
local ans, errno = pool:query("google.com", dns_record.A, dns_record.IN, 0.0001)
print(ans, errno) --> nil, ETIMEDOUT
-- socket gets left open but can't be reused.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant