Skip to content
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

fix socket.timeout retry #495

Merged
merged 6 commits into from
Apr 27, 2018

Conversation

thehesiod
Copy link
Contributor

resolves #494

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Apr 23, 2018
@thehesiod thehesiod changed the title Thehesiod socket timeout fix socket.timeout retry Apr 23, 2018
Copy link
Contributor

@theacodes theacodes left a comment

Choose a reason for hiding this comment

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

I would actually like a separate branch for socket.timeout, e.g.:

try:
    ...
except ...:
except socket.timeout as socket_timeout:
    ...
except socket.error as socket_error:
    ...
...

Also, would you mind adding a test to cover this case?

@thehesiod
Copy link
Contributor Author

ok updated, I think I can change the existing tests as there is no mention of TimeoutError being thrown for sockets, instead even for python2 socket.timeout is what it should be: https://docs.python.org/2/library/socket.html#socket.timeout

@theacodes
Copy link
Contributor

@thehesiod if you rebase, #496 should fix the test failure.

@theacodes theacodes merged commit fff3ae5 into googleapis:master Apr 27, 2018
@thehesiod thehesiod deleted the thehesiod-socket-timeout branch March 8, 2019 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

_retry_request not catching socket.timeout
3 participants