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

Added switch for selection of IPv4 or IPv6 #21

Merged
merged 2 commits into from
Sep 14, 2022

Conversation

nradonicich
Copy link
Contributor

Probably the wrong way to do this but I needed a way to select what address family to use when doing a query to an NTP server (IPv4, IPv6 or any).

A simple if statement did it for me, feel free to change or reject.

Copy link
Owner

@cf-natali cf-natali left a comment

Choose a reason for hiding this comment

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

Thanks!

I think it makes sense, but the implementation can probably be simplified, see comment.

ntplib.py Outdated Show resolved Hide resolved
@nradonicich
Copy link
Contributor Author

Updated, this should work (tested passing nothing, socket.AF_INET and socket.AF_INET6)

@cf-natali cf-natali merged commit db8e957 into cf-natali:master Sep 14, 2022
@cf-natali
Copy link
Owner

Merged, thanks @nradonicich !

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