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

add timeout for net request #544

Closed
wants to merge 2 commits into from
Closed

add timeout for net request #544

wants to merge 2 commits into from

Conversation

zp1996
Copy link

@zp1996 zp1996 commented Dec 20, 2018

sometimes in china will be timeout:)

zhoupeng added 2 commits July 2, 2018 22:33
Change-Id: I53e17591c83d90ba223e5dad86bd3bb07415818e
Change-Id: I45769a8a670fb5ea6a224a730e94e13df13420fb
@shadowspawn
Copy link
Collaborator

Thanks for suggestion!

  1. Is there a reason you added the timeout to just those calls and not to all operations? In particular, would it be better or worse to put the timeout in CURL_PARAMS and WGET_PARAMS?

  2. I don't think a timeout can be added without improving the error handling in n first. For example, if is_ok fails, I think n will currently output invalid version which will be confusing. Is that what you see with your change when you do get a timeout?

On a related note, both curl and wget support a startup configuration file, so it is possible to change their behaviour without needing to change n:

@shadowspawn
Copy link
Collaborator

Closing due to issues noted above, and have suggested work-around.

Feel free to open a new issue if it comes up again, with new information and renewed interest.

Thank you for your contributions.

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