-
Notifications
You must be signed in to change notification settings - Fork 47
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
server: fix REST connection #175
Conversation
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.
LGTM 🐋
@@ -194,8 +195,8 @@ func (s *Server) Start() error { | |||
|
|||
// We'll also create and start an accompanying proxy to serve | |||
// clients through REST. | |||
ctx, cancel := context.WithCancel(context.Background()) | |||
defer cancel() |
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.
Nice catch!
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.
LGTM 🕺
@guggero Linter failing. Can merge once Travis pass. |
If the REST listener is not nil at this point, it is always already wrapped in a TLS listener and doesn't need to be wrapped again.
Because of a misplaced defer of a context cancel, the REST proxy didn't work at all before the fix in this commit.
Funding conflicts: Add auctioncli commands and track in Prometheus
Because of a misplaced defer of a context cancel, the REST proxy didn't
work at all before the fix in this commit.