Skip to content

Quick question on aws_retry_token_record_success #599

Answered by graebm
quinnj asked this question in Q&A
Discussion options

You must be logged in to vote

The idea behind an aws_retry_token, is that you should be holding one when you perform any HTTP request, even if it's your first try. Then you need to inform the system whether or not the token was used successfully (by calling aws_retry_token_record_success() to indicate success, or aws_retry_strategy_schedule_retry() to indicate failure). Finally, after you are 100% done with the token, you call aws_retry_token_release() to decrement its ref-count and allow its memory to be cleaned up.

The flow should be like:

  1. you have an HTTP request you want to execute...
  2. you call aws_retry_strategy_acquire_retry_token():
    • if that fails immediately, or the callback informs you it failed, then you per…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by quinnj
Comment options

You must be logged in to vote
1 reply
@graebm
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants