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: use correct context for dial #341

Merged
merged 1 commit into from
Apr 7, 2024

Conversation

ferhatelmas
Copy link
Contributor

It's lock protected and not safe for concurrent use.
It should use previously read context.
Otherwise, can panic under high concurrency.

@imroc
Copy link
Owner

imroc commented Apr 7, 2024

The logic of the standard library is used here: https://github.com/golang/go/blob/go1.22.2/src/net/http/transport.go#L1485

If you think there is a problem, you can submit a PR to the upstream standard library

@imroc imroc closed this Apr 7, 2024
@ferhatelmas
Copy link
Contributor Author

ferhatelmas commented Apr 7, 2024

@imroc imroc reopened this Apr 7, 2024
@imroc
Copy link
Owner

imroc commented Apr 7, 2024

Oh yeah, sorry I misunderstood before, this is a nice catch!

@imroc imroc merged commit 19bac2c into imroc:master Apr 7, 2024
2 checks passed
@ferhatelmas ferhatelmas deleted the ferhat/dial-context branch April 7, 2024 21:25
@ferhatelmas
Copy link
Contributor Author

Is it possible to cut a new release for the fix?

@imroc
Copy link
Owner

imroc commented Apr 8, 2024

Released in v3.43.2 @ferhatelmas

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