Skip to content

test: Return early and avoid using nil handler #7411

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

Merged
merged 2 commits into from
May 4, 2023

Conversation

Emyrk
Copy link
Member

@Emyrk Emyrk commented May 4, 2023

No description provided.

@Emyrk Emyrk requested a review from spikecurtis May 4, 2023 14:14
@Emyrk Emyrk merged commit 9908c84 into main May 4, 2023
@Emyrk Emyrk deleted the stevenmasley/proxy_test_panic branch May 4, 2023 16:14
@github-actions github-actions bot locked and limited conversation to collaborators May 4, 2023
// HTTP Server
// HTTP Server. We have to start this once to get the access URL to start
// the workspace proxy with. The workspace proxy has the handler, so the
// http server will start with a 503 until the proxy is started.
Copy link
Contributor

Choose a reason for hiding this comment

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

A strategy that avoids the mutex is to create a listener, then pass that to http.Serve()

l := net.Listen("tcp", "127.0.0.1:")
url := "http://" + l.Addr().String()

I guess it gets a bit more complex if we need TLS. Does the wsproxy care whether its TLS?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants