-
Notifications
You must be signed in to change notification settings - Fork 60
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
Send() returns an incorrect error if the context is cancelled #309
Comments
Agreed that for a canceled context we should return |
if this is a legitimate case, you would still want to fail matching the deadline provided on the context. |
We won't block indefinitely if there's no credit. We'll return an You bring up a good point about knowing ahead of time if there's enough credit. I'll take a look at that. |
Thinking about this more. The lack of credit should be temporal. So, I'm hesitant to just outright fail the transfer as that could be racy (i.e. the flow frame is in flight with credit, we just haven't received/processed it yet). There is a bit of ambiguity though. There are two places where the sender waits on Maybe I'm overthinking all of this and just returning |
Today you get back this error:
Error{Condition: amqp:link:transfer-limit-exceeded, Description: credit limit exceeded for sending link dx-pqVSDqo0PVdKQEeXLLDbJo25byEAW-CJCn6CxPLZEgdV5E-bDCQ, Info: map[]}
Coming from here: link
Now that we have proper rollback if sends fail/cancel I think we can safely return context.Canceled or context.DeadlineExceeded if there were no side effects worth reporting.
The text was updated successfully, but these errors were encountered: