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

Better handling of port bind failures #2818

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Better handling of port bind failures #2818

wants to merge 6 commits into from

Conversation

Tronic
Copy link
Member

@Tronic Tronic commented Sep 5, 2023

sanic --port 80 was printing very ugly error messages.

@Tronic Tronic requested a review from a team as a code owner September 5, 2023 18:31
p = server_settings["port"]
if not p or p >= 1024:
raise
addr = f"{server_settings['host']}:{p}"
Copy link
Member

Choose a reason for hiding this comment

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

Do we care about ipv6 brackets here?

Copy link
Member Author

Choose a reason for hiding this comment

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

I should probably add a function in sanic/helpers for that and port numbers as these are getting repeated in many places.

Copy link
Member

Choose a reason for hiding this comment

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

Are you planning to do that here, or should we make it a new issue to handle on its own?

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.

None yet

2 participants