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

dreampi check_internet_connection function doesn't handle socket.timeout? #20

Open
Docteh opened this issue Dec 28, 2022 · 0 comments
Open

Comments

@Docteh
Copy link

Docteh commented Dec 28, 2022

I saw someone on reddit (discussion here) with an interesting issue with getting this to work using a PC image

image

dreampi/dreampi.py

Lines 51 to 57 in 4937c80

for host in IP_ADDRESS_LIST:
try:
socket.setdefaulttimeout(timeout)
socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect((host, port))
return True
except socket.error:
pass

with the timeout: timed out message I suspect that socket.timeout exceptions should also be given a pass, particularly if the DNS server being tested not respond to TCP connections on port 53

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant