-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
base: main
Are you sure you want to change the base?
Conversation
…se because that would print the traceback twice.
p = server_settings["port"] | ||
if not p or p >= 1024: | ||
raise | ||
addr = f"{server_settings['host']}:{p}" |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
sanic --port 80
was printing very ugly error messages.