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

Fix: DNS status check might failed in Windows #29

Merged
merged 1 commit into from
Oct 2, 2024

Conversation

WendaoLee
Copy link
Contributor

@WendaoLee WendaoLee commented Oct 2, 2024

Abstract

The ping command's parameter is different between Windows and other Unix-like system.

Which may cause check_ping always failed when user run tinystatus.py in Windows because '-c' parameter not means 'count' as it in Linux or MacOS.

Also,the time unit is 'millisecond' for '-w' parameter,which means 'time to wait for response' in Windows's ping command,so the value change from 2 to 2000 .

More Details

Microsoft Related Documents.

# Abstract
The `ping` command's parameter is different between Windows and other Unix-like system.

Which may cause `check_ping` always failed when user run `tinystatus.py` in Windows because '-c' parameter not means 'count' as it in Linux or MacOS.

Also,the time unit is 'millisecond' for '-w' parameter,which means  'time to wait for response' in Windows's `ping` command,so the value change from `2 `to `2000` .

# More Details

[Microsoft Documents](https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/ping).
Copy link
Owner

@harsxv harsxv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had no idea Python syntax could be a little different on Windows. Thanks for pointing that out!

@harsxv harsxv merged commit c1dcc49 into harsxv:master Oct 2, 2024
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

Successfully merging this pull request may close these issues.

2 participants