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

Timeout in async DoQ query sometimes doesn't work #962

Closed
fleurysun opened this issue Jul 19, 2023 · 2 comments
Closed

Timeout in async DoQ query sometimes doesn't work #962

fleurysun opened this issue Jul 19, 2023 · 2 comments

Comments

@fleurysun
Copy link

Sometimes timeout in dns.asyncquery.quic doesn't work as expected, when querying some servers with verification disabled , for example 64.191.0.241, which listens on port 853 accepting QUIC data and may not be a DoQ server, it will hang at awaiting self._wake_up.wait in function dns.quic._asyncio.AsyncioQuicStream._wait_for_wake_up.

Timeout in sync DoQ query works well.

To Reproduce:

import asyncio
import dns.message
import dns.asyncquery
import dns.rdatatype

async def check_doq(ip, query_name, timeout):
    query = dns.message.make_query(query_name, dns.rdatatype.A)
    try:
        response = await dns.asyncquery.quic(query, ip, verify=False, timeout=timeout)
        print(response)
    except Exception as e:
        print(str(e), e)

if __name__ == "__main__":
    asyncio.run(check_doq("64.191.0.241", "dnspython.org", 6))

System info:

  • dnspython version [2.5]
  • Python version [3.10.12]
  • OS version [CentOS 7.8.2003]
rthalley added a commit that referenced this issue Jul 19, 2023
@rthalley
Copy link
Owner

Thanks again for your reports! I hope things are fixed now!

@fleurysun
Copy link
Author

Thank you for quick fix, I use dnspython for serveral years, it's awesome!

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

2 participants