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(cli): reuse port listener on configurator #4054

Merged
merged 1 commit into from
Oct 22, 2024
Merged

Conversation

schoren
Copy link
Contributor

@schoren schoren commented Oct 22, 2024

This PR changes the way the configurator chooses an open port to listen for OAuth callback. Previously, we got a free port by opening a TCPListener on port 0, which makes the OS return a port. We then closed the listener and use the port.

The problem is that, some times, at least on MacOS, we can get port already in use by the time we want to start the actual listener.

Screenshot 2024-10-22 at 13 55 32

This PR changes the flow, so instead of closing the port, we keep it open, and we pass it to the http server that handles the OAuth listener.

Changes

Fixes

Checklist

  • tested locally
  • added new dependencies
  • updated the docs
  • added a test

Loom video

Add your loom video here if your work can be visualized

Copy link

vercel bot commented Oct 22, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
tracetest ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 22, 2024 4:56pm

@schoren schoren merged commit 5f98683 into main Oct 22, 2024
40 checks passed
@schoren schoren deleted the fix-oauth-listener branch October 22, 2024 17:27
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