We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Using github.com/sendgrid/sendgrid-go v3.14.0, it appears that Client is not safe for concurrent use.
github.com/sendgrid/sendgrid-go v3.14.0
Client
I was running a service with the race detector enabled, and it detected a data race at:
github.com/sendgrid/sendgrid-go.(*Client).SendWithContext() /vendor/github.com/sendgrid/sendgrid-go/base_interface.go:65 +0x8c
The problem is (at least) this line:
cl.Body = mail.GetRequestBody(email)
If the client is called concurrently, there is a data race in writing the email parameter to the Body field.
Ideally, the assignment should either be protected by a mutex, or even better, the parameter should not be assigned to any field.
Otherwise, it would be great if you could document that the client is not safe for concurrent use.
The text was updated successfully, but these errors were encountered:
I faced same issue using version v3.16.0.
v3.16.0
Sorry, something went wrong.
No branches or pull requests
Using
github.com/sendgrid/sendgrid-go v3.14.0
, it appears thatClient
is not safe for concurrent use.I was running a service with the race detector enabled, and it detected a data race at:
The problem is (at least) this line:
If the client is called concurrently, there is a data race in writing the email parameter to the Body field.
Ideally, the assignment should either be protected by a mutex, or even better, the parameter should not be assigned to any field.
Otherwise, it would be great if you could document that the client is not safe for concurrent use.
The text was updated successfully, but these errors were encountered: