-
Notifications
You must be signed in to change notification settings - Fork 13
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
http proxy: allow multiple listeners #949
Conversation
0c731d2
to
7a795db
Compare
http_proxy.go
Outdated
g.Go(func() error { | ||
return srv.Serve(l) | ||
}) |
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.
^C2024/11/07 14:41:01.894475 [proxy] [INFO] closing down proxy
2024/11/07 14:41:01.894515 [proxy] [INFO] waiting for connections to close
2024/11/07 14:41:01.894522 [proxy] [INFO] all connections closed
2024/11/07 14:41:01.894584 [ERROR] fatal error exiting: http: Server closed
exit status 1
Closing a proxy in a handler mode results in a fatal error.
LGTM, personally I would go with a wrapper over a list of listeners that returns any accepted connection from the underlying slice, but this is even better! Left a proposition on adding "named" listeners. |
MultiListener is complicated its main disadvantage is that you accept a connection and then send it to worker. It's not guaranteed there is a worker available. It could be done but the standard interfaces are not well suited for that. |
7a795db
to
d3d3289
Compare
@Choraden PTAL |
d3d3289
to
c967c5a
Compare
Add HTTPProxyConfig.ExtraListeners and refactor code to work with multiple listeners.
c967c5a
to
e0da9aa
Compare
Squashed some commits and rebased. |
Add HTTPProxyConfig.ExtraListeners and refactor code to work with multiple listeners.