Skip to content

Comments

Adds a second attempt to send the HTTP request in case of a network fail...#2

Merged
rauchy merged 7 commits intorauchy:masterfrom
danevron:http-request-retry
Dec 4, 2014
Merged

Adds a second attempt to send the HTTP request in case of a network fail...#2
rauchy merged 7 commits intorauchy:masterfrom
danevron:http-request-retry

Conversation

@danevron
Copy link

We found few examples for HTTP failures causing SMS's sending failure.
This is a simple approach to reduce the chance for failure.

@danevron
Copy link
Author

Hi Rauchy,
Any chance you can take a look at this?

@danevron
Copy link
Author

danevron commented Dec 3, 2014

Can you take another look?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Last comment I have, I promise!

Maybe it's better to have a 'tries' counter going backwards from 3 to 1, instead of a meaningless 'index' counter going from 1 to 3. Think about it, there's nothing 'index'-ish about this.

This way:

tries = 3
# ...
if tries > 0
# ...

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with the index name not being relevant for the use. Changed to attempts.
I want to keep the forward counter so I could use it in the sleep for creating the exponential growth.

rauchy pushed a commit that referenced this pull request Dec 4, 2014
Adds a second attempt to send the HTTP request in case of a network fail...
@rauchy rauchy merged commit 5f3ae92 into rauchy:master Dec 4, 2014
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.

2 participants