Correct the Go README claim about when Send blocks#330
Open
etbyrd wants to merge 1 commit into
Open
Conversation
The README stated unconditionally that Send, Reply, and Forward keep the HTTP request open until the downstream SMTP transaction completes, and told readers to size their context deadline for 30-60 seconds accordingly. That is only true when Wait is set. Without it the call returns once the message is accepted for delivery, so the advice pushed a needlessly long deadline onto the common path. Forward has no Wait field at all and always returns on acceptance. The Node and Python READMEs already describe this correctly; this brings Go in line with them.
Confidence Score: 5/5This looks safe to merge.
|
| Filename | Overview |
|---|---|
| sdk-go/README.md | Updates the Go SDK timeout guidance to match the documented wait behavior for send, reply, and forward. |
Reviews (1): Last reviewed commit: "Correct the Go README claim about when S..." | Re-trigger Greptile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
sdk-go/README.mdstated unconditionally:That is only true when
Waitis set. Without it, the API returns once the message is accepted for delivery, so the guidance pushed a needlessly long context deadline onto the common non-waiting path.Two things wrong, not one:
Wait, not the default.Forwardhas noWaitfield at all (ForwardParamsinsdk-go/client.goexposesTo,BodyText,Subject,From,IdempotencyKeyonly), so it can never block on SMTP. OnlySendParamsandReplyParamscarryWait.The Node and Python READMEs already describe this correctly. This brings Go in line with their wording.
Verification
ForwardParamshas noWaitfield: confirmed insdk-go/client.go.wait === truein the send-mail handler.