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 set nil for 'checkRedirect' when no value exists, tmp fix. #927

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

asafambar
Copy link
Contributor

  • All tests passed. If this feature is not already covered by the tests, I added new tests.
  • All static analysis checks passed.
  • This pull request is on the dev branch.
  • I used gofmt for formatting the code before submitting the pull request.

… data race when sending many requests in parllell
@asafambar
Copy link
Contributor Author

asafambar commented Mar 25, 2024

This PR is a temp solution for data race found by go tool, it prevent the tool from failing.
in curation we have many requests in parallel using the same http client, one of the struct values 'CheckRedirect' is set to nil after each request, as for the usage of the use today with the client, the value is always nil, so there is no need to write any nil value again which cause data race,
For better future use of this client to have parallel requests safely (only on post requests or specific config use it) , this should not be changed after each requests but be determined on the Initialization of the client.

@asafambar asafambar changed the title Fix setting nil for 'checkRedirect' when no value exists, tmp fix for… Fix set nil for 'checkRedirect' when no value exists, tmp fix for… Mar 25, 2024
@asafambar asafambar changed the title Fix set nil for 'checkRedirect' when no value exists, tmp fix for… Fix set nil for 'checkRedirect' when no value exists, tmp fix. Mar 25, 2024
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.

None yet

1 participant