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: don't open browser if port is occupied #92

Merged
merged 8 commits into from
Oct 28, 2020

Conversation

busunkim96
Copy link
Contributor

@busunkim96 busunkim96 commented Oct 23, 2020

Set allow_reuse_address to False so a server is not created on a port that is already in use.

wsgiref.simple_server.WSGIServer.allow_reuse_address = False

Also a laundry list of changes to make this repo consistent with others:

  • adds generic repo templates via synthtool
  • replaces tox with nox
  • use Kokoro instead of Travis
  • Drops support for EOL Python versions (python < 3.5)

Fixes #75

@busunkim96 busunkim96 requested a review from a team as a code owner October 23, 2020 20:59
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Oct 23, 2020
Copy link
Contributor

@tswast tswast left a comment

Choose a reason for hiding this comment

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

Thanks!

@harshjadon9
Copy link

harshjadon9 commented Feb 9, 2021

wsgiref.simple_server.WSGIServer.allow_reuse_address = False

where should i paste it in WSGI.py? @tswast @busunkim96
i m using django, apache

@tswast tswast deleted the fail-if-port-occupied branch February 17, 2021 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

run_local_server should fail fast if the requested port is already used
3 participants