gera2ld / async_dns

DNS library based on asyncio
MIT License
70 stars 17 forks source link

ValueError: reuse_port not supported by socket module #18

Closed tombohub closed 3 years ago

tombohub commented 3 years ago

trying the readme example:

import asyncio
from async_dns import types
from async_dns.resolver import ProxyResolver
from async_dns import get_nameservers

# I have tried both without (proxies=get_nameservers()) 
resolver = ProxyResolver(proxies=get_nameservers())
res = asyncio.run(resolver.query('www.baidu.com', types.A))
print(res)

I get error:

ValueError: reuse_port not supported by socket module

what could be the reason?

gera2ld commented 3 years ago

It was a bug: reuse_port was enabled incorrectly.