-
Notifications
You must be signed in to change notification settings - Fork 2
Adds ability for the user to set whether or not proxyless should be used #1509
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -23,8 +23,7 @@ func newParallelPreferProxyless(proxyless proxyless, d Dialer, opts *Options) Di | |||||||||
} | ||||||||||
|
||||||||||
func (d *parallelDialer) DialContext(ctx context.Context, network, addr string) (net.Conn, error) { | ||||||||||
if !common.SupportsProxyless() { | ||||||||||
log.Debugf("Proxyless transport not supported, falling back to default dialer for %s", addr) | ||||||||||
if !common.SupportsProxyless() || !d.opts.UseProxyless() { | ||||||||||
// If the proxyless transport is not supported, we fall back to the default dialer. | ||||||||||
Comment on lines
+26
to
27
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The condition logic appears incorrect. The function should fall back to default dialer when proxyless is NOT supported OR when proxyless is NOT enabled. However, the function name
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||||||
return d.dialer.DialContext(ctx, network, addr) | ||||||||||
} | ||||||||||
|
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.
The
useProxyless
field is added to the Client struct but there's no nil check before using it ininitDialers
. IfuseProxyless
is nil when passed toUseProxyless
, this could cause a panic when the function is called.Copilot uses AI. Check for mistakes.